#Design Pattern
7 articles
Learning Design Patterns with PHP - State Pattern
Learn the State pattern to switch behavior dynamically by encapsulating state-specific processing in separate classes.
Learning Design Patterns with PHP - Bridge Pattern
Understand the Bridge pattern to separate functional and implementation extensions using composition in PHP application design.
Learning Design Patterns with PHP - Strategy
Implement the Strategy pattern to switch algorithms dynamically, reduce conditionals, and follow OCP in your PHP code.
DI and Service Locator
Implement dependency injection patterns. Compare DI and Service Locator with constructor injection examples for loosely coupled code.
Learning Design Patterns with PHP - Adapter ~Modifying APIs~
Learn the Adapter pattern to reuse existing code without modification while adapting incompatible interfaces flexibly.
Learning Design Patterns with PHP - Singleton: Limiting Instances
Understand the Singleton pattern to control instance creation, restrict access, and manage single object state in PHP.
Learning Design Patterns with PHP - Template Method ~Filling in the Blanks~
Discover the Template Method pattern to aggregate common processes in superclasses and abstract specific subclass implementations.