From 9fd800b9f6e76752ca79a6b3182ebf8a143661c1 Mon Sep 17 00:00:00 2001 From: Faust Date: Fri, 3 Apr 2015 00:24:24 +0200 Subject: [PATCH] fix embed some files and add download link to README.md --- Behavioral/ChainOfResponsibilities/index.rst | 12 +++++ Behavioral/Mediator/index.rst | 18 +++++++ Creational/AbstractFactory/index.rst | 24 +++++++++ Creational/Builder/Parts/index.rst | 53 -------------------- Creational/Builder/index.rst | 36 +++++++++++++ README.md | 1 + conf.py | 2 +- index.rst | 2 +- 8 files changed, 93 insertions(+), 55 deletions(-) delete mode 100644 Creational/Builder/Parts/index.rst diff --git a/Behavioral/ChainOfResponsibilities/index.rst b/Behavioral/ChainOfResponsibilities/index.rst index c838a29..68883c7 100644 --- a/Behavioral/ChainOfResponsibilities/index.rst +++ b/Behavioral/ChainOfResponsibilities/index.rst @@ -45,6 +45,18 @@ Request.php :language: php :linenos: +Responsible/FastStorage.php + +.. literalinclude:: Responsible/FastStorage.php + :language: php + :linenos: + +Responsible/SlowStorage.php + +.. literalinclude:: Responsible/SlowStorage.php + :language: php + :linenos: + Test ---- diff --git a/Behavioral/Mediator/index.rst b/Behavioral/Mediator/index.rst index 7df0287..d922b44 100644 --- a/Behavioral/Mediator/index.rst +++ b/Behavioral/Mediator/index.rst @@ -42,6 +42,24 @@ Colleague.php :language: php :linenos: +Subsystem/Client.php + +.. literalinclude:: Subsystem/Client.php + :language: php + :linenos: + +Subsystem/Database.php + +.. literalinclude:: Subsystem/Database.php + :language: php + :linenos: + +Subsystem/Server.php + +.. literalinclude:: Subsystem/Server.php + :language: php + :linenos: + Test ---- diff --git a/Creational/AbstractFactory/index.rst b/Creational/AbstractFactory/index.rst index 707968c..e8d2000 100644 --- a/Creational/AbstractFactory/index.rst +++ b/Creational/AbstractFactory/index.rst @@ -57,6 +57,30 @@ Picture.php :language: php :linenos: +Html/Picture.php + +.. literalinclude:: Html/Picture.php + :language: php + :linenos: + +Html/Text.php + +.. literalinclude:: Html/Text.php + :language: php + :linenos: + +Json/Picture.php + +.. literalinclude:: Json/Picture.php + :language: php + :linenos: + +Json/Text.php + +.. literalinclude:: Json/Text.php + :language: php + :linenos: + Test ---- diff --git a/Creational/Builder/Parts/index.rst b/Creational/Builder/Parts/index.rst deleted file mode 100644 index 8760de0..0000000 --- a/Creational/Builder/Parts/index.rst +++ /dev/null @@ -1,53 +0,0 @@ -Purpose -======= - -Examples -======== - -- - -Code ----- - -You can also find these code on `GitHub`_ - -Wheel.php - -.. literalinclude:: Wheel.php - :language: php - :linenos: - -Door.php - -.. literalinclude:: Door.php - :language: php - :linenos: - -Car.php - -.. literalinclude:: Car.php - :language: php - :linenos: - -Bike.php - -.. literalinclude:: Bike.php - :language: php - :linenos: - -Vehicle.php - -.. literalinclude:: Vehicle.php - :language: php - :linenos: - -Engine.php - -.. literalinclude:: Engine.php - :language: php - :linenos: - -Test ----- - -.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational/Builder/Parts diff --git a/Creational/Builder/index.rst b/Creational/Builder/index.rst index b636e01..77fc308 100644 --- a/Creational/Builder/index.rst +++ b/Creational/Builder/index.rst @@ -56,6 +56,42 @@ BikeBuilder.php :language: php :linenos: +Parts/Wheel.php + +.. literalinclude:: Parts/Wheel.php + :language: php + :linenos: + +Parts/Door.php + +.. literalinclude:: 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 ---- diff --git a/README.md b/README.md index a64312f..05e3d11 100755 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![Build Status](https://travis-ci.org/domnikl/DesignPatternsPHP.png?branch=master)](https://travis-ci.org/domnikl/DesignPatternsPHP) [Read the Docs of DesignPatternsPHP](http://designpatterns-php.readthedocs.org) +or [Download as PDF/Epub](https://readthedocs.org/projects/designpatterns-php/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). diff --git a/conf.py b/conf.py index c58ec9d..a21fb82 100644 --- a/conf.py +++ b/conf.py @@ -48,7 +48,7 @@ master_doc = 'index' # General information about the project. project = u'DesignPatternsPHP' copyright = u'2015, Dominik Liebler' -author = u'Dominik Liebler' +author = u'Dominik Liebler with contributors' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/index.rst b/index.rst index e3a755a..c91e458 100644 --- a/index.rst +++ b/index.rst @@ -19,7 +19,7 @@ Patterns -------- The patterns can be structured in roughly three different categories. -Please click on the +Please click `here `__ for a full explanation of the pattern on Wikipedia.