Skip to content
项目

eimg/design-patterns-php

在 GitHub 查看

关于

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

学习与教育

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

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

探索相关项目

加载中…