sort php files Creational

This commit is contained in:
Faust
2015-04-07 22:00:12 +02:00
parent ff327e3a0c
commit 23abee8078
23 changed files with 100 additions and 99 deletions

View File

@@ -20,4 +20,4 @@ carrying out this communication.
State/README
Strategy/README
TemplateMethod/README
Visitor/README
Visitor/README

View File

@@ -21,9 +21,9 @@ Code
You can also find these code on `GitHub`_
Text.php
AbstractFactory.php
.. literalinclude:: Text.php
.. literalinclude:: AbstractFactory.php
:language: php
:linenos:
@@ -33,9 +33,9 @@ JsonFactory.php
:language: php
:linenos:
AbstractFactory.php
HtmlFactory.php
.. literalinclude:: AbstractFactory.php
.. literalinclude:: HtmlFactory.php
:language: php
:linenos:
@@ -45,27 +45,15 @@ MediaInterface.php
:language: php
:linenos:
HtmlFactory.php
.. literalinclude:: HtmlFactory.php
:language: php
:linenos:
Picture.php
.. literalinclude:: Picture.php
:language: php
:linenos:
Html/Picture.php
Text.php
.. literalinclude:: Html/Picture.php
:language: php
:linenos:
Html/Text.php
.. literalinclude:: Html/Text.php
.. literalinclude:: Text.php
:language: php
:linenos:
@@ -81,6 +69,18 @@ Json/Text.php
:language: php
:linenos:
Html/Picture.php
.. literalinclude:: Html/Picture.php
:language: php
:linenos:
Html/Text.php
.. literalinclude:: Html/Text.php
:language: php
:linenos:
Test
----
@@ -91,4 +91,4 @@ Tests/AbstractFactoryTest.php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/AbstractFactory
.. _`Abstract Factory`: http://en.wikipedia.org/wiki/Abstract_factory_pattern
.. _`Abstract Factory`: http://en.wikipedia.org/wiki/Abstract_factory_pattern

View File

@@ -32,27 +32,51 @@ Code
You can also find these code on `GitHub`_
Director.php
.. literalinclude:: Director.php
:language: php
:linenos:
BuilderInterface.php
.. literalinclude:: BuilderInterface.php
:language: php
:linenos:
BikeBuilder.php
.. literalinclude:: BikeBuilder.php
:language: php
:linenos:
CarBuilder.php
.. literalinclude:: CarBuilder.php
:language: php
:linenos:
Director.php
Parts/Vehicle.php
.. literalinclude:: Director.php
.. literalinclude:: Parts/Vehicle.php
:language: php
:linenos:
BikeBuilder.php
Parts/Bike.php
.. literalinclude:: BikeBuilder.php
.. literalinclude:: Parts/Bike.php
:language: php
:linenos:
Parts/Car.php
.. literalinclude:: Parts/Car.php
:language: php
:linenos:
Parts/Engine.php
.. literalinclude:: Parts/Engine.php
:language: php
:linenos:
@@ -68,30 +92,6 @@ Parts/Door.php
:language: php
:linenos:
Parts/Car.php
.. literalinclude:: Parts/Car.php
:language: php
:linenos:
Parts/Bike.php
.. literalinclude:: Parts/Bike.php
:language: php
:linenos:
Parts/Vehicle.php
.. literalinclude:: Parts/Vehicle.php
:language: php
:linenos:
Parts/Engine.php
.. literalinclude:: Parts/Engine.php
:language: php
:linenos:
Test
----
@@ -102,4 +102,4 @@ Tests/DirectorTest.php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/Builder
.. _`Builder`: http://en.wikipedia.org/wiki/Builder_pattern
.. _`Builder`: http://en.wikipedia.org/wiki/Builder_pattern

View File

@@ -28,15 +28,9 @@ Code
You can also find these code on `GitHub`_
Porsche.php
FactoryMethod.php
.. literalinclude:: Porsche.php
:language: php
:linenos:
GermanFactory.php
.. literalinclude:: GermanFactory.php
.. literalinclude:: FactoryMethod.php
:language: php
:linenos:
@@ -46,15 +40,21 @@ ItalianFactory.php
:language: php
:linenos:
GermanFactory.php
.. literalinclude:: GermanFactory.php
:language: php
:linenos:
VehicleInterface.php
.. literalinclude:: VehicleInterface.php
:language: php
:linenos:
FactoryMethod.php
Porsche.php
.. literalinclude:: FactoryMethod.php
.. literalinclude:: Porsche.php
:language: php
:linenos:
@@ -80,4 +80,4 @@ Tests/FactoryMethodTest.php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/FactoryMethod
.. _`Factory Method`: http://en.wikipedia.org/wiki/Factory_method_pattern
.. _`Factory Method`: http://en.wikipedia.org/wiki/Factory_method_pattern

View File

@@ -54,17 +54,17 @@ Worker.php
Test
----
Tests/TestWorker.php
.. literalinclude:: Tests/TestWorker.php
:language: php
:linenos:
Tests/PoolTest.php
.. literalinclude:: Tests/PoolTest.php
:language: php
:linenos:
Tests/TestWorker.php
.. literalinclude:: Tests/TestWorker.php
:language: php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/Pool
.. _`Pool`: http://en.wikipedia.org/wiki/Object_pool_pattern

View File

@@ -25,6 +25,12 @@ Code
You can also find these code on `GitHub`_
index.php
.. literalinclude:: index.php
:language: php
:linenos:
BookPrototype.php
.. literalinclude:: BookPrototype.php
@@ -37,12 +43,6 @@ BarBookPrototype.php
:language: php
:linenos:
index.php
.. literalinclude:: index.php
:language: php
:linenos:
FooBookPrototype.php
.. literalinclude:: FooBookPrototype.php
@@ -53,4 +53,4 @@ Test
----
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/Prototype
.. _`Prototype`: http://en.wikipedia.org/wiki/Prototype_pattern
.. _`Prototype`: http://en.wikipedia.org/wiki/Prototype_pattern

View File

@@ -19,4 +19,4 @@ this object creation.
Prototype/README
SimpleFactory/README
Singleton/README
StaticFactory/README
StaticFactory/README

View File

@@ -36,18 +36,18 @@ VehicleInterface.php
:language: php
:linenos:
Scooter.php
.. literalinclude:: Scooter.php
:language: php
:linenos:
Bicycle.php
.. literalinclude:: Bicycle.php
:language: php
:linenos:
Scooter.php
.. literalinclude:: Scooter.php
:language: php
:linenos:
Test
----

View File

@@ -47,4 +47,4 @@ Tests/SingletonTest.php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/Singleton
.. _`Singleton`: http://en.wikipedia.org/wiki/Singleton_pattern
.. _`Singleton`: http://en.wikipedia.org/wiki/Singleton_pattern

View File

@@ -51,4 +51,4 @@ Tests/DelegationTest.php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/More/Delegation
.. _`Delegation`: http://en.wikipedia.org/wiki/Delegation_pattern
.. _`Delegation`: http://en.wikipedia.org/wiki/Delegation_pattern

View File

@@ -6,4 +6,4 @@ More
Delegation/README
ServiceLocator/README
Repository/README
Repository/README

View File

@@ -81,4 +81,4 @@ Tests/ServiceLocatorTest.php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/More/ServiceLocator
.. _`Service Locator`: http://en.wikipedia.org/wiki/Service_locator_pattern
.. _`Service Locator`: http://en.wikipedia.org/wiki/Service_locator_pattern

View File

@@ -37,9 +37,7 @@ Contribute
Please feel free to fork and extend existing or add your own examples
and send a pull request with your changes! To establish a consistent
code quality, please check your code using
`PHP\_CodeSniffer <https://github.com/squizlabs/PHP_CodeSniffer>`__
against `PSR2
standard <https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md>`__
`PHP CodeSniffer`_ against `PSR2 standard`_
using ``./vendor/bin/phpcs -p --standard=PSR2 --ignore=vendor .``.
License
@@ -47,8 +45,7 @@ License
(The MIT License)
Copyright (c) 2014 Dominik Liebler and
`contributors <https://github.com/domnikl/DesignPatternsPHP/graphs/contributors>`__
Copyright (c) 2014 `Dominik Liebler`_ and `contributors`_
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
@@ -70,3 +67,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.. _`design patterns`: http://en.wikipedia.org/wiki/Software_design_pattern
.. _`PHP CodeSniffer`: https://github.com/squizlabs/PHP_CodeSniffer
.. _`PSR2 standard`: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
.. _`Dominik Liebler`: https://github.com/domnikl
.. _`contributors`: https://github.com/domnikl/DesignPatternsPHP/graphs/contributors

View File

@@ -68,4 +68,4 @@ Tests/AdapterTest.php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Adapter
.. _`Adapter / Wrapper`: http://en.wikipedia.org/wiki/Adapter_pattern
.. _`Adapter / Wrapper`: http://en.wikipedia.org/wiki/Adapter_pattern

View File

@@ -71,4 +71,4 @@ Tests/BridgeTest.php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Bridge
.. _`Bridge`: http://en.wikipedia.org/wiki/Bridge_pattern
.. _`Bridge`: http://en.wikipedia.org/wiki/Bridge_pattern

View File

@@ -62,4 +62,4 @@ Tests/CompositeTest.php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Composite
.. _`Composite`: http://en.wikipedia.org/wiki/Composite_pattern
.. _`Composite`: http://en.wikipedia.org/wiki/Composite_pattern

View File

@@ -57,4 +57,4 @@ Tests/DataMapperTest.php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/DataMapper
.. _`Data Mapper`: http://en.wikipedia.org/wiki/Data_mapper_pattern
.. _`Data Mapper`: http://en.wikipedia.org/wiki/Data_mapper_pattern

View File

@@ -65,4 +65,4 @@ Tests/DecoratorTest.php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Decorator
.. _`Decorator`: http://en.wikipedia.org/wiki/Decorator_pattern
.. _`Decorator`: http://en.wikipedia.org/wiki/Decorator_pattern

View File

@@ -85,4 +85,4 @@ Tests/config.php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/DependencyInjection
.. _`Dependency Injection`: http://en.wikipedia.org/wiki/Dependency_injection
.. _`Dependency Injection`: http://en.wikipedia.org/wiki/Dependency_injection

View File

@@ -63,4 +63,4 @@ Tests/FacadeTest.php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Facade
.. _`Facade`: http://en.wikipedia.org/wiki/Facade_pattern
.. _`Facade`: http://en.wikipedia.org/wiki/Facade_pattern

View File

@@ -41,4 +41,4 @@ Test
----
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Proxy
.. _`Proxy`: http://en.wikipedia.org/wiki/Proxy_pattern
.. _`Proxy`: http://en.wikipedia.org/wiki/Proxy_pattern

View File

@@ -17,4 +17,4 @@ relationships between entities.
Facade/README
FluentInterface/README
Proxy/README
Registry/README
Registry/README

View File

@@ -44,4 +44,4 @@ Tests/RegistryTest.php
:linenos:
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Registry
.. _`Registry`: http://en.wikipedia.org/wiki/Service_locator_pattern
.. _`Registry`: http://en.wikipedia.org/wiki/Service_locator_pattern