Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

Examples of design patterns in PHP
https://github.com/jkapuscik2/design-patterns-php

design-patterns patterns-php php82

Last synced: about 1 month ago
JSON representation

Examples of design patterns in PHP

Awesome Lists containing this project

README

        

## Design Patterns

This project is set of simple examples of usage of different design patterns in a real world scenarios. Each one have a short description and guideline:
- [Factory Method](https://medium.com/@j.kapuscik2/getting-started-with-design-patterns-in-php-4d451ccdfb71)
- [src/Creational Patterns](https://medium.com/@j.kapuscik2/src/Creational-design-patterns-in-php-db365d3245ce)
- [Observer](https://medium.com/@j.kapuscik2/observer-pattern-in-php-2ba240f89fb2)
- [Iterator](https://medium.com/@j.kapuscik2/iterator-pattern-in-php-b7624f6bdbcf)
- [State & Strategy](https://medium.com/@j.kapuscik2/state-strategy-design-patterns-by-example-f57ebd7b6211)
- [Template Method](https://medium.com/@j.kapuscik2/template-method-pattern-in-php-6116fd7e8ccc?source=friends_link&sk=ac4c483446bd5a5323c09a662bd54116)
- [Flyweight](https://medium.com/swlh/flyweight-design-pattern-in-php-edcda0486fb0?source=friends_link&sk=a0fa3083d5afd7e41af8a4f7a1df05f1)
- [Proxy](https://medium.com/better-programming/proxy-design-pattern-and-how-to-use-it-acd0f11e5330)
- [Decorator](https://medium.com/better-programming/decorator-c04fae63dfff)
- [Dependency Injection](https://medium.com/better-programming/dependency-injection-8f09a93ec995)
- [Composite](https://medium.com/swlh/composite-908878748d0e)
- [Adapter](https://medium.com/swlh/building-cloud-storage-application-with-adapter-design-pattern-8b0105a1bda7)
- [Facade](https://medium.com/better-programming/what-is-facade-design-pattern-67cb09ce35d4)
- [Bridge](https://medium.com/better-programming/what-is-bridge-design-pattern-89bfa581fbd3)
- [Chain of Responsibility](https://medium.com/@j.kapuscik2/what-is-chain-of-responsibility-design-pattern-ff4d22abd124)
- [Visitor](https://medium.com/@j.kapuscik2/what-is-visitor-design-pattern-8451fb75876)
- [Command](https://medium.com/@j.kapuscik2/what-is-cqrs-command-design-pattern-5d400fd9f93a)
- [Null Object](https://medium.com/@j.kapuscik2/what-is-null-object-design-pattern-f3b4d3d28636)
- [Fluent Interface](https://medium.com/@j.kapuscik2/what-is-the-fluent-interface-design-pattern-2797645b2a2e)
- [Specification](https://medium.com/@j.kapuscik2/what-is-the-specification-design-pattern-4051dd9e71c3)

### Following patterns have so far been described:

#### Creational:
1. [Factory Method](/src/Creational/FactoryMethod)
2. [Abstract Factory](/src/Creational/AbstractFactory)
3. [Singleton](/src/Creational/Singleton)
4. [Builder](/src/Creational/Builder)
5. [Prototype](/src/Creational/Prototype)

#### Behavioral:
1. [Iterator](src/Behavioral/Iterator)
2. [Observer](src/Behavioral/Observer)
3. [State](src/Behavioral/State)
4. [Strategy](src/Behavioral/Strategy)
5. [Template Method](src/Behavioral/TemplateMethod)
6. [Chain of Responsibility](src/Behavioral/ChainOfResponsibility)
7. [Visitor](src/Behavioral/Visitor)
8. [Command](src/Behavioral/Command)
9. [Null Object](src/Behavioral/NullObject)
10. [Specification](src/Behavioral/Specification)

#### Structural:
1. [Adapter](src/Structural/Adapter)
2. [Decorator](src/Structural/Decorator)
3. [Proxy](src/Structural/Proxy)
4. [Dependency Injection](src/Structural/DependencyInjection)
5. [Facade](src/Structural/Facade)
6. [Composite](src/Structural/Composite)
7. [Bridge](src/Structural/Bridge)
8. [Flyweight](src/Structural/Flyweight)
9. [Fluent Interface](src/Structural/FluentInterface)