Patterns for the Rest of Us
Design patterns explained in plain language with real-world PHP examples. Covers decorator, proxy, adapter, bridge, visitor, middleware, repository, and more.
The infamous Repository Pattern in PHP
The repository pattern is a data source abstraction that behaves like a collection; containing domain (value) objects.
How the PHP Middleware Pattern works and can easily be applied
The Middleware Pattern allows you to easily change the input and output of an action; one layer at a time.
Using the Visitor Pattern in PHP
The Visitor Pattern opens up your entities to extension without changing them (much); and keeps the code separate.
Adapter Pattern vs. Bridge Pattern
The Adapter pattern and the Bridge Pattern have brought along a lot of confusion. Time to connect the dots.
Decorator Pattern vs. Proxy Pattern
Although similar, Decorators and Proxies are not the same. It all depends on their intent.