mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-04 14:07:25 +02:00
fix wikipedia links for pdf version
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
Chain Of Responsibilities |Wikipedia|_
|
`Chain Of Responsibilities`_
|
||||||
======================================
|
============================
|
||||||
|
|
||||||
Purpose:
|
Purpose:
|
||||||
--------
|
--------
|
||||||
@@ -67,7 +67,4 @@ Tests/ChainTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/ChainOfResponsibilities
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/ChainOfResponsibilities
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Chain Of Responsibilities`: http://en.wikipedia.org/wiki/Chain_of_responsibility_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Chain_of_responsibility_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Command |Wikipedia|_
|
`Command`_
|
||||||
====================
|
==========
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -74,7 +74,4 @@ Tests/CommandTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Command
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Command
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Command`: http://en.wikipedia.org/wiki/Command_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Command_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Iterator |Wikipedia|_
|
`Iterator`_
|
||||||
=====================
|
===========
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -67,7 +67,4 @@ Tests/IteratorTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Iterator
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Iterator
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Iterator`: http://en.wikipedia.org/wiki/Iterator_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Iterator_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Mediator |Wikipedia|_
|
`Mediator`_
|
||||||
=====================
|
===========
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -70,7 +70,4 @@ Tests/MediatorTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Mediator
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Mediator
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Mediator`: http://en.wikipedia.org/wiki/Mediator_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Mediator_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Memento |Wikipedia|_
|
`Memento`_
|
||||||
====================
|
==========
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -65,7 +65,4 @@ Tests/MementoTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Memento
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Memento
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Memento`: http://en.wikipedia.org/wiki/Memento_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Memento_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Null Object |Wikipedia|_
|
`Null Object`_
|
||||||
========================
|
==============
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -72,7 +72,4 @@ Tests/LoggerTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/NullObject
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/NullObject
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Null Object`: http://en.wikipedia.org/wiki/Null_Object_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Null_Object_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Observer |Wikipedia|_
|
`Observer`_
|
||||||
=====================
|
===========
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -55,7 +55,4 @@ Tests/ObserverTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Observer
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Observer
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Observer`: http://en.wikipedia.org/wiki/Observer_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Observer_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Specification |Wikipedia|_
|
`Specification`_
|
||||||
==========================
|
================
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -73,7 +73,4 @@ Tests/SpecificationTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Specification
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Specification
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Specification`: http://en.wikipedia.org/wiki/Specification_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Specification_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
State |Wikipedia|_
|
`State`_
|
||||||
==================
|
========
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -54,7 +54,4 @@ Test
|
|||||||
----
|
----
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/State
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/State
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`State`: http://en.wikipedia.org/wiki/State_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/State_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Strategy |Wikipedia|_
|
`Strategy`_
|
||||||
=====================
|
===========
|
||||||
|
|
||||||
Terminology:
|
Terminology:
|
||||||
------------
|
------------
|
||||||
@@ -68,7 +68,4 @@ Tests/StrategyTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Strategy
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Strategy
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Strategy`: http://en.wikipedia.org/wiki/Strategy_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Strategy_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Template Method |Wikipedia|_
|
`Template Method`_
|
||||||
============================
|
==================
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -61,7 +61,4 @@ Tests/JourneyTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/TemplateMethod
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/TemplateMethod
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Template Method`: http://en.wikipedia.org/wiki/Template_method_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Template_method_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Visitor |Wikipedia|_
|
`Visitor`_
|
||||||
====================
|
==========
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -65,7 +65,4 @@ Tests/VisitorTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Visitor
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral/Visitor
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Visitor`: http://en.wikipedia.org/wiki/Visitor_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Visitor_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Abstract Factory |Wikipedia|_
|
`Abstract Factory`_
|
||||||
=============================
|
===================
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -91,7 +91,4 @@ Tests/AbstractFactoryTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/AbstractFactory
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/AbstractFactory
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Abstract Factory`: http://en.wikipedia.org/wiki/Abstract_factory_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Abstract_factory_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Builder |Wikipedia|_
|
`Builder`_
|
||||||
====================
|
==========
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -102,7 +102,4 @@ Tests/DirectorTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/Builder
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/Builder
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Builder`: http://en.wikipedia.org/wiki/Builder_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Builder_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Factory Method |Wikipedia|_
|
`Factory Method`_
|
||||||
===========================
|
=================
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -80,7 +80,4 @@ Tests/FactoryMethodTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/FactoryMethod
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/FactoryMethod
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Factory Method`: http://en.wikipedia.org/wiki/Factory_method_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Factory_method_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Pool |Wikipedia|_
|
`Pool`_
|
||||||
=================
|
=======
|
||||||
|
|
||||||
The **object pool pattern** is a software creational design pattern that
|
The **object pool pattern** is a software creational design pattern that
|
||||||
uses a set of initialized objects kept ready to use – a "pool" – rather
|
uses a set of initialized objects kept ready to use – a "pool" – rather
|
||||||
@@ -67,7 +67,4 @@ Tests/PoolTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/Pool
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/Pool
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Pool`: http://en.wikipedia.org/wiki/Object_pool_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Object_pool_pattern
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
Prototype |Wikipedia|_
|
`Prototype`_
|
||||||
======================
|
============
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -53,7 +53,4 @@ Test
|
|||||||
----
|
----
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/Prototype
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/Prototype
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Prototype`: http://en.wikipedia.org/wiki/Prototype_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Prototype_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Singleton |Wikipedia|_
|
`Singleton`_
|
||||||
======================
|
============
|
||||||
|
|
||||||
**THIS IS CONSIDERED TO BE AN ANTI-PATTERN! FOR BETTER TESTABILITY AND
|
**THIS IS CONSIDERED TO BE AN ANTI-PATTERN! FOR BETTER TESTABILITY AND
|
||||||
MAINTAINABILITY USE DEPENDENCY INJECTION!**
|
MAINTAINABILITY USE DEPENDENCY INJECTION!**
|
||||||
@@ -47,7 +47,4 @@ Tests/SingletonTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/Singleton
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/Singleton
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Singleton`: http://en.wikipedia.org/wiki/Singleton_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Singleton_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Delegation |Wikipedia|_
|
`Delegation`_
|
||||||
=======================
|
=============
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -51,7 +51,4 @@ Tests/DelegationTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/More/Delegation
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/More/Delegation
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Delegation`: http://en.wikipedia.org/wiki/Delegation_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Delegation_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Service Locator |Wikipedia|_
|
`Service Locator`_
|
||||||
============================
|
==================
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -81,7 +81,4 @@ Tests/ServiceLocatorTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/More/ServiceLocator
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/More/ServiceLocator
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Service Locator`: http://en.wikipedia.org/wiki/Service_locator_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Service_locator_pattern
|
|
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
[](https://travis-ci.org/domnikl/DesignPatternsPHP)
|
[](https://travis-ci.org/domnikl/DesignPatternsPHP)
|
||||||
|
|
||||||
[Read the Docs of DesignPatternsPHP](http://designpatterns-php.readthedocs.org)
|
[Read the Docs of DesignPatternsPHP](http://designpatternsphp.readthedocs.org)
|
||||||
or [Download as PDF/Epub](https://readthedocs.org/projects/designpatterns-php/downloads/)
|
or [Download as PDF/Epub](https://readthedocs.org/projects/designpatternsphp/downloads/)
|
||||||
|
|
||||||
This is a collection of known design patterns and some sample code how to implement them in PHP. Every pattern has a small list of examples (most of them from Zend Framework, Symfony2 or Doctrine2 as I'm most familiar with this software).
|
This is a collection of known design patterns and some sample code how to implement them in PHP. Every pattern has a small list of examples (most of them from Zend Framework, Symfony2 or Doctrine2 as I'm most familiar with this software).
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
Adapter / Wrapper |Wikipedia|_
|
`Adapter / Wrapper`_
|
||||||
==============================
|
====================
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -68,7 +68,4 @@ Tests/AdapterTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Adapter
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Adapter
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Adapter / Wrapper`: http://en.wikipedia.org/wiki/Adapter_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Adapter_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Bridge |Wikipedia|_
|
`Bridge`_
|
||||||
===================
|
=========
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -71,7 +71,4 @@ Tests/BridgeTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Bridge
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Bridge
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Bridge`: http://en.wikipedia.org/wiki/Bridge_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Bridge_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Composite |Wikipedia|_
|
`Composite`_
|
||||||
======================
|
============
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -62,7 +62,4 @@ Tests/CompositeTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Composite
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Composite
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Composite`: http://en.wikipedia.org/wiki/Composite_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Composite_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Data Mapper |Wikipedia|_
|
`Data Mapper`_
|
||||||
========================
|
==============
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -57,7 +57,4 @@ Tests/DataMapperTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/DataMapper
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/DataMapper
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Data Mapper`: http://en.wikipedia.org/wiki/Data_mapper_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Data_mapper_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Decorator |Wikipedia|_
|
`Decorator`_
|
||||||
======================
|
============
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -65,7 +65,4 @@ Tests/DecoratorTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Decorator
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Decorator
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Decorator`: http://en.wikipedia.org/wiki/Decorator_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Decorator_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Dependency Injection |Wikipedia|_
|
`Dependency Injection`_
|
||||||
=================================
|
=======================
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -85,7 +85,4 @@ Tests/config.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/DependencyInjection
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/DependencyInjection
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Dependency Injection`: http://en.wikipedia.org/wiki/Dependency_injection
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Dependency_injection
|
|
@@ -1,5 +1,5 @@
|
|||||||
Facade |Wikipedia|_
|
`Facade`_
|
||||||
===================
|
=========
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -63,7 +63,4 @@ Tests/FacadeTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Facade
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Facade
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Facade`: http://en.wikipedia.org/wiki/Facade_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Facade_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Fluent Interface |Wikipedia|_
|
`Fluent Interface`_
|
||||||
=============================
|
===================
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -43,7 +43,5 @@ Tests/FluentInterfaceTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/FluentInterface
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/FluentInterface
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
|
||||||
:height: 30 px
|
.. _`Fluent Interface`: http://en.wikipedia.org/wiki/Fluent_interface
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Fluent_interface
|
|
@@ -1,5 +1,5 @@
|
|||||||
Proxy |Wikipedia|_
|
`Proxy`_
|
||||||
==================
|
========
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -41,7 +41,4 @@ Test
|
|||||||
----
|
----
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Proxy
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Proxy
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Proxy`: http://en.wikipedia.org/wiki/Proxy_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Proxy_pattern
|
|
@@ -1,5 +1,5 @@
|
|||||||
Registry |Wikipedia|_
|
`Registry`_
|
||||||
=====================
|
===========
|
||||||
|
|
||||||
Purpose
|
Purpose
|
||||||
-------
|
-------
|
||||||
@@ -44,7 +44,4 @@ Tests/RegistryTest.php
|
|||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Registry
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Registry
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`Registry`: http://en.wikipedia.org/wiki/Service_locator_pattern
|
||||||
:height: 30 px
|
|
||||||
:width: 30 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Service_locator_pattern
|
|
Binary file not shown.
Before Width: | Height: | Size: 43 KiB |
2
conf.py
2
conf.py
@@ -212,7 +212,7 @@ latex_elements = {
|
|||||||
#'pointsize': '10pt',
|
#'pointsize': '10pt',
|
||||||
|
|
||||||
# Additional stuff for the LaTeX preamble.
|
# Additional stuff for the LaTeX preamble.
|
||||||
#'preamble': '',
|
'preamble': '\setcounter{tocdepth}{2}',
|
||||||
|
|
||||||
# Latex figure (float) alignment
|
# Latex figure (float) alignment
|
||||||
#'figure_align': 'htbp',
|
#'figure_align': 'htbp',
|
||||||
|
14
index.rst
14
index.rst
@@ -1,13 +1,14 @@
|
|||||||
.. DesignPatternsPHP
|
.. DesignPatternsPHP
|
||||||
|
|
||||||
|
=================
|
||||||
DesignPatternsPHP
|
DesignPatternsPHP
|
||||||
=================
|
=================
|
||||||
|
|
||||||
.. image:: https://readthedocs.org/projects/designpatterns-php/badge/?version=latest
|
.. image:: https://readthedocs.org/projects/designpatternsphp/badge/?version=latest
|
||||||
:target: https://readthedocs.org/projects/designpatterns-php/?badge=latest
|
:target: https://readthedocs.org/projects/designpatternsphp/?badge=latest
|
||||||
:alt: Documentation Status
|
:alt: Documentation Status
|
||||||
|
|
||||||
This is a collection of known design patterns and some sample code how
|
This is a collection of known `design patterns`_ and some sample code how
|
||||||
to implement them in PHP. Every pattern has a small list of examples
|
to implement them in PHP. Every pattern has a small list of examples
|
||||||
(most of them from Zend Framework, Symfony2 or Doctrine2 as I'm most
|
(most of them from Zend Framework, Symfony2 or Doctrine2 as I'm most
|
||||||
familiar with this software).
|
familiar with this software).
|
||||||
@@ -19,7 +20,7 @@ Patterns
|
|||||||
--------
|
--------
|
||||||
|
|
||||||
The patterns can be structured in roughly three different categories.
|
The patterns can be structured in roughly three different categories.
|
||||||
Please click |Wikipedia|_ for a full explanation of the pattern on Wikipedia.
|
Please click on **the title of every pattern's page** for a full explanation of the pattern on Wikipedia.
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:titlesonly:
|
:titlesonly:
|
||||||
@@ -68,7 +69,4 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|||||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
.. |Wikipedia| image:: /_static/Wikipedia-logo.png
|
.. _`design patterns`: http://en.wikipedia.org/wiki/Software_design_pattern
|
||||||
:height: 20 px
|
|
||||||
:width: 20 px
|
|
||||||
.. _Wikipedia: http://en.wikipedia.org/wiki/Software_design_pattern
|
|
||||||
|
Reference in New Issue
Block a user