burakaktna / DesignPatternsPHP

This Git repository contains examples of the three types of design patterns: creational, structural, and behavioral design patterns implemented in PHP.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP Design Patterns Repository

This Git repository contains examples of the three types of design patterns: creational, structural, and behavioral design patterns implemented in PHP.

Creational Design Patterns

Creational design patterns focus on object creation mechanisms, trying to create objects in a manner suitable to the situation. The examples in this repository for Creational Design Patterns include:

  • Singleton Pattern
  • Factory Pattern
  • Abstract Factory Pattern
  • Builder Pattern
  • Prototype Pattern

Structural Design Patterns

Structural design patterns are concerned with object composition and provide class and object composition structures that can be utilized to form large structures. The examples in this repository for Structural Design Patterns include:

  • Adapter Pattern
  • Bridge Pattern
  • Composite Pattern
  • Decorator Pattern
  • Façade Pattern
  • Flyweight Pattern
  • Proxy Pattern

Behavioral Design Patterns

Behavioral design patterns are concerned with communication between objects, encapsulating behavior in objects, and delegating requests to appropriate objects. The examples in this repository for Behavioral Design Patterns include:

  • Chain of Responsibility Pattern
  • Command Pattern
  • Interpreter Pattern
  • Iterator Pattern
  • Mediator Pattern
  • Memento Pattern
  • Observer Pattern
  • State Pattern
  • Strategy Pattern
  • Template Method Pattern
  • Visitor Pattern

To learn more about PHP Design Patterns, you can visit our repository and explore the examples provided.

Getting Started

To use this project, simply clone the repository and run it on your local machine.

Prerequisites

To run this project, you will need to have PHP installed on your machine.

Installing

  1. Clone the repository to your local machine using git clone <https://github.com/burakaktna/DesignPatternsPHP.git>
  2. Navigate to the project directory using the command line or terminal
  3. Run php Examples/{example-file-name}.php to execute the example for the design pattern of your choice

Contributing

If you would like to contribute to this project, please fork the repository and submit a pull request.

Authors

  • Muhammed Burak AKTUNA

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

Thank you to the following resources for their guidance and inspiration:

  • Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
  • Head First Design Patterns by Eric Freeman and Elisabeth Robson

About

This Git repository contains examples of the three types of design patterns: creational, structural, and behavioral design patterns implemented in PHP.

License:MIT License


Languages

Language:PHP 100.0%