Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eimg/design-patterns-php
Most simplest design pattern implementation in PHP, including all 23 GoF patterns plus some other patterns
https://github.com/eimg/design-patterns-php
design-patterns oop php
Last synced: 2 months ago
JSON representation
Most simplest design pattern implementation in PHP, including all 23 GoF patterns plus some other patterns
- Host: GitHub
- URL: https://github.com/eimg/design-patterns-php
- Owner: eimg
- License: mit
- Created: 2018-02-22T06:09:26.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-22T12:48:53.000Z (almost 7 years ago)
- Last Synced: 2024-08-02T05:11:43.587Z (6 months ago)
- Topics: design-patterns, oop, php
- Language: PHP
- Homepage:
- Size: 15.6 KB
- Stars: 188
- Watchers: 27
- Forks: 64
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Design Patterns by Examples in PHP
Most simplest design pattern implementation in PHP, including all 23 GoF patterns plus some other patterns. These code are part of **PHP Framework Course** provided by [Fairway Technology](https://fairway.com.mm).
## How to learn?
Read the code.
### Creational Patterns
1. [Factory Method](1-factory.php)
2. [Abstract Factory](2-abstract-factory.php)
3. [Builder](3-builder.php)
4. [Singleton](4-singleton.php)
5. [Prototype](5-prototype.php)### Structural Patterns
1. [Adapter](6-adapter.php)
2. [Decorator](7-decorator.php)
3. [Facade](8-facade.php)
4. [Proxy](9-proxy.php)
5. [Composite](10-composite.php)
6. [Bridge](11-bridge.php)
7. [Flyweight](12-flyweight.php)### Behavioral Patterns
1. [Strategy](13-strategy.php)
2. [Observer](14-observer.php)
3. [Command](15-command.php)
4. [Chain of Responsibility](16-chain.php)
5. [Iterator](17-iterator.php)
6. [Mediator](18-mediator.php)
7. [Interpreter](19-interpreter.php)
8. [State](20-state.php)
9. [Memento](21-memento.php)
10. [Visitor](22-visitor.php)
11. [Template](23-template.php)### Other (non-GoF)
1. [Dependency Injection](other/dependency-injection.php)
2. [Null Object](other/null.php)
3. [Servant](other/servant.php)## Note
These code are oversimplified by design and may not follow all best practices. Use this only as education purpose in attempt to understand the patterns, not as direct example to use in real projects.
## License and Contact
* License - [MIT License](LICENSE.md)
* Website - [eimaung.com](https://eimaung.com)
* Email - [[email protected]](mailto:[email protected])