This project is a collection of design patterns, examples on how to use them, and their implementations in PHP.
The project includes the following design patterns:
-
Creational Patterns
- ✅ Singleton
- ✅ Factory Method
- ✅ Abstract Factory
- ✅ Builder
- ✅ Prototype
-
Structural Patterns
- ✅ Adapter
- ✅ Bridge
- ❌ Composite
- ✅ Decorator
- ✅ Facade
- ❌ Flyweight
- ❌ Proxy
-
Behavioral Patterns
- ✅ Chain of Responsibility
- ✅ Command
- ❌ Iterator
- ❌ Mediator
- ❌ Memento
- ✅ Observer
- ✅ State
- ✅ Strategy
- ❌ Template Method
- ✅ Visitor
Each pattern is accompanied by PHP code and examples of how to use it.
- Clone the repository to your local machine.
- Open the example files and study them or copy the code you need.