mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-09-25 22:09:23 +02:00
removed old examples
This commit is contained in:
@@ -7,12 +7,6 @@ Purpose
|
||||
Decouple an abstraction from its implementation so that the two can vary
|
||||
independently.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
- `Symfony
|
||||
DoctrineBridge <https://github.com/symfony/DoctrineBridge>`__
|
||||
|
||||
UML Diagram
|
||||
-----------
|
||||
|
||||
|
@@ -13,8 +13,6 @@ Examples
|
||||
- a form class instance handles all its form elements like a single
|
||||
instance of the form, when ``render()`` is called, it subsequently
|
||||
runs through all its child elements and calls ``render()`` on them
|
||||
- ``Zend_Config``: a tree of configuration options, each one is a
|
||||
``Zend_Config`` object itself
|
||||
|
||||
UML Diagram
|
||||
-----------
|
||||
|
@@ -9,7 +9,6 @@ To dynamically add new functionality to class instances.
|
||||
Examples
|
||||
--------
|
||||
|
||||
- Zend Framework: decorators for ``Zend_Form_Element`` instances
|
||||
- Web Service Layer: Decorators JSON and XML for a REST service (in
|
||||
this case, only one of these should be allowed of course)
|
||||
|
||||
|
@@ -22,7 +22,7 @@ Examples
|
||||
that is injected into a ``Connection`` object. For testing purposes,
|
||||
one can easily create a mock object of the configuration and inject
|
||||
that into the ``Connection`` object
|
||||
- Symfony and Zend Framework 2 already have containers for DI that
|
||||
- many frameworks already have containers for DI that
|
||||
create objects via a configuration array and inject them where needed
|
||||
(i.e. in Controllers)
|
||||
|
||||
|
@@ -13,7 +13,6 @@ Examples
|
||||
- Doctrine2's QueryBuilder works something like that example class
|
||||
below
|
||||
- PHPUnit uses fluent interfaces to build mock objects
|
||||
- Yii Framework: CDbCommand and CActiveRecord use this pattern, too
|
||||
|
||||
UML Diagram
|
||||
-----------
|
||||
|
@@ -9,14 +9,6 @@ application, is typically implemented using an abstract class with only
|
||||
static methods (or using the Singleton pattern). Remember that this introduces
|
||||
global state, which should be avoided at all times! Instead implement it using Dependency Injection!
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
- Zend Framework 1: ``Zend_Registry`` holds the application's logger
|
||||
object, front controller etc.
|
||||
- Yii Framework: ``CWebApplication`` holds all the application
|
||||
components, such as ``CWebUser``, ``CUrlManager``, etc.
|
||||
|
||||
UML Diagram
|
||||
-----------
|
||||
|
||||
|
Reference in New Issue
Block a user