设计模式的PHP实现示例
这是一些用PHP实现著名设计模式的示例代码。每个模式都有例子(其中大部分来自Zend框架,Symfony2或Doctrine2)。
Patterns
The patterns can be structured in roughly three different categories. Please click on the for a full explanation of the pattern on Wikipedia.
Creational
- AbstractFactory
- Builder
- FactoryMethod
- Multiton (is considered an anti-pattern! )
- Pool
- Prototype
- SimpleFactory
- Singleton (is considered an anti-pattern! )
- StaticFactory
Structural
- Adapter
- Bridge
- Composite
- DataMapper
- Decorator
- DependencyInjection
- Facade
- FluentInterface
- Proxy
- Registry
Behavioral
- ChainOfResponsibilities
- Command
- Iterator
- Mediator
- Memento
- NullObject
- Observer
- Specification
- State
- Strategy
- TemplateMethod
- Visitor
More
本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
转载本站原创文章,请注明出处,并保留原始链接、图片水印。
本站是一个以用户分享为主的开源技术平台,欢迎各类分享!