eimg / design-patterns-php

Most simplest design pattern implementation in PHP, including all 23 GoF patterns plus some other patterns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

How to learn?

Read the code.

Creational Patterns

  1. Factory Method
  2. Abstract Factory
  3. Builder
  4. Singleton
  5. Prototype

Structural Patterns

  1. Adapter
  2. Decorator
  3. Facade
  4. Proxy
  5. Composite
  6. Bridge
  7. Flyweight

Behavioral Patterns

  1. Strategy
  2. Observer
  3. Command
  4. Chain of Responsibility
  5. Iterator
  6. Mediator
  7. Interpreter
  8. State
  9. Memento
  10. Visitor
  11. Template

Other (non-GoF)

  1. Dependency Injection
  2. Null Object
  3. Servant

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

About

Most simplest design pattern implementation in PHP, including all 23 GoF patterns plus some other patterns

License:MIT License


Languages

Language:PHP 100.0%