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