mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-31 12:10:10 +02:00
sort php files Creational
This commit is contained in:
@@ -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
|
||||
----
|
||||
|
||||
|
@@ -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
|
||||
----
|
||||
|
||||
|
@@ -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:
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
----
|
||||
|
||||
|
11
README.rst
11
README.rst
@@ -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
|
||||
|
Reference in New Issue
Block a user