Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/ehsangazar/design-patterns-php

All Design Patterns Samples in PHP
https://github.com/ehsangazar/design-patterns-php

abstract-factory-pattern adapter-pattern bridge-pattern builder-pattern chain-of-responsibility-pattern decorator-pattern design-patterns factory-method-pattern flyweight-pattern interpreter-pattern iterator-pattern mediator-pattern momento-pattern observer-pattern php prototype-pattern proxy-pattern singleton-pattern strategy-pattern visitor-pattern

Last synced: 3 months ago
JSON representation

All Design Patterns Samples in PHP

Lists

README

        

## Design Patterns in PHP with Real Examples
In this repo you can find all familiar design patterns that uses in most php frameworks.
Design patterns divided into three categories as below :

Creational
----------

- [**Abstract Factory**](https://github.com/ehsangazar/design-patterns-php/blob/master/creational-patterns/abstract-factory.php)
- [**Builder**](https://github.com/ehsangazar/design-patterns-php/blob/master/creational-patterns/builder.php)
- [**Factory Method**](https://github.com/ehsangazar/design-patterns-php/blob/master/creational-patterns/factory-method.php)
- [**Prototype**](https://github.com/ehsangazar/design-patterns-php/blob/master/creational-patterns/prototype.php)
- [**Singleton**](https://github.com/ehsangazar/design-patterns-php/blob/master/creational-patterns/singleton.php)

Structural
----------

- [**Adapter**](https://github.com/ehsangazar/design-patterns-php/blob/master/structural-patterns/adapter.php)
- [**Bridge**](https://github.com/ehsangazar/design-patterns-php/blob/master/structural-patterns/bridge.php)
- [**Composite**](https://github.com/ehsangazar/design-patterns-php/blob/master/structural-patterns/composite.php)
- [**Decorator**](https://github.com/ehsangazar/design-patterns-php/blob/master/structural-patterns/decorator.php)
- [**Facade**](https://github.com/ehsangazar/design-patterns-php/blob/master/structural-patterns/facade.php)
- [**Flyweight**](https://github.com/ehsangazar/design-patterns-php/blob/master/structural-patterns/flyweight.php)
- [**Null Object**](https://github.com/ehsangazar/design-patterns-php/blob/master/structural-patterns/null_object.php)
- [**Proxy**](https://github.com/ehsangazar/design-patterns-php/blob/master/structural-patterns/proxy.php)

Behavioral
----------

- [**Chain Of Responsibility**](https://github.com/ehsangazar/design-patterns-php/blob/master/behavioral-patterns/chain-of-responsibility.php)
- [**Command**](https://github.com/ehsangazar/design-patterns-php/blob/master/behavioral-patterns/command.php)
- [**Interpreter**](https://github.com/ehsangazar/design-patterns-php/blob/master/behavioral-patterns/interpreter.php)
- [**Iterator**](https://github.com/ehsangazar/design-patterns-php/blob/master/behavioral-patterns/iterator.php)
- [**Mediator**](https://github.com/ehsangazar/design-patterns-php/blob/master/behavioral-patterns/mediator.php)
- [**Momento**](https://github.com/ehsangazar/design-patterns-php/blob/master/behavioral-patterns/momento.php)
- [**Observer**](https://github.com/ehsangazar/design-patterns-php/blob/master/behavioral-patterns/observer.php)
- [**State**](https://github.com/ehsangazar/design-patterns-php/blob/master/behavioral-patterns/state.php)
- [**Strategy**](https://github.com/ehsangazar/design-patterns-php/blob/master/behavioral-patterns/strategy.php)
- [**Template Method**](https://github.com/ehsangazar/design-patterns-php/blob/master/behavioral-patterns/template-method.php)
- [**Visitor**](https://github.com/ehsangazar/design-patterns-php/blob/master/behavioral-patterns/visitor.php)