From 9d91da41539c2569e9ed3d170a20d6e15008b43d Mon Sep 17 00:00:00 2001 From: Faust Date: Thu, 2 Apr 2015 00:16:16 +0200 Subject: [PATCH] create TocTree index --- .gitignore | 1 + Behavioral/index.rst | 45 ++++++------------ Creational/Multiton/index.rst | 4 +- Creational/index.rst | 36 +++++--------- More/index.rst | 19 ++------ Structural/Bridge/index.rst | 3 ++ Structural/Composite/index.rst | 4 +- Structural/index.rst | 41 +++++----------- conf.py | 2 +- index.rst | 87 +++------------------------------- 10 files changed, 58 insertions(+), 184 deletions(-) diff --git a/.gitignore b/.gitignore index 601f317..1466a8e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .idea /nbproject /vendor/ +_build/ diff --git a/Behavioral/index.rst b/Behavioral/index.rst index 5691a0d..3513745 100644 --- a/Behavioral/index.rst +++ b/Behavioral/index.rst @@ -6,35 +6,18 @@ that identify common communication patterns between objects and realize these patterns. By doing so, these patterns increase flexibility in carrying out this communication. -- `ChainOfResponsibilities `__ - `:notebook: `__ -- `Command `__ - `:notebook: `__ -- `Iterator `__ - `:notebook: `__ -- `Mediator `__ - `:notebook: `__ -- `NullObject `__ - `:notebook: `__ -- `Observer `__ - `:notebook: `__ -- `Specification `__ - `:notebook: `__ -- `State `__ - `:notebook: `__ -- `Strategy `__ - `:notebook: `__ -- `TemplateMethod `__ - `:notebook: `__ -- `Visitor `__ - `:notebook: `__ +.. toctree:: + :titlesonly: -Code ----- - -You can also find these code on `GitHub`_ - -Test ----- - -.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Behavioral + ChainOfResponsibilities/index + Command/index + Iterator/index + Mediator/index + Memento/index + NullObject/index + Observer/index + Specification/index + State/index + Strategy/index + TemplateMethod/index + Visitor/index \ No newline at end of file diff --git a/Creational/Multiton/index.rst b/Creational/Multiton/index.rst index 66b8764..3f5167e 100644 --- a/Creational/Multiton/index.rst +++ b/Creational/Multiton/index.rst @@ -5,13 +5,13 @@ Multiton MAINTAINABILITY USE DEPENDENCY INJECTION!** Purpose -======= +------- To have only a list of named instances that are used, like a singleton but with n instances. Examples -======== +-------- - 2 DB Connectors, e.g. one for MySQL, the other for SQLite - multiple Loggers (one for debug messages, one for errors) diff --git a/Creational/index.rst b/Creational/index.rst index 1e34638..6d041a7 100644 --- a/Creational/index.rst +++ b/Creational/index.rst @@ -8,29 +8,15 @@ could result in design problems or added complexity to the design. Creational design patterns solve this problem by somehow controlling this object creation. -- `AbstractFactory `__ - `:notebook: `__ -- `Builder `__ - `:notebook: `__ -- `FactoryMethod `__ - `:notebook: `__ -- `Multiton `__ (is considered an anti-pattern! :no\_entry:) -- `Pool `__ - `:notebook: `__ -- `Prototype `__ - `:notebook: `__ -- `SimpleFactory `__ -- `Singleton `__ - `:notebook: `__ (is - considered an anti-pattern! :no\_entry:) -- `StaticFactory `__ +.. toctree:: + :titlesonly: -Code ----- - -You can also find these code on `GitHub`_ - -Test ----- - -.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Creational + AbstractFactory/index + Builder/index + FactoryMethod/index + Multiton/index + Pool/index + Prototype/index + SimpleFactory/index + Singleton/index + StaticFactory/index \ No newline at end of file diff --git a/More/index.rst b/More/index.rst index fd0cfb9..6ba85d3 100644 --- a/More/index.rst +++ b/More/index.rst @@ -1,18 +1,9 @@ More ==== -- `Delegation `__ - `:notebook: `__ -- `ServiceLocator `__ - `:notebook: `__ -- `Repository `__ +.. toctree:: + :titlesonly: -Code ----- - -You can also find these code on `GitHub`_ - -Test ----- - -.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/More + Delegation/index + ServiceLocator/index + Repository/index \ No newline at end of file diff --git a/Structural/Bridge/index.rst b/Structural/Bridge/index.rst index e83c84c..5fb8cfe 100644 --- a/Structural/Bridge/index.rst +++ b/Structural/Bridge/index.rst @@ -1,3 +1,6 @@ +Bridge +====== + Purpose ------- diff --git a/Structural/Composite/index.rst b/Structural/Composite/index.rst index ad59cc2..ff91f66 100644 --- a/Structural/Composite/index.rst +++ b/Structural/Composite/index.rst @@ -2,13 +2,13 @@ Composite ========= Purpose -======= +------- To treat a group of objects the same way as a single instance of the object. Examples -======== +-------- - a form class instance handles all its form elements like a single instance of the form, when ``render()`` is called, it subsequently diff --git a/Structural/index.rst b/Structural/index.rst index 49867ee..6505413 100644 --- a/Structural/index.rst +++ b/Structural/index.rst @@ -5,33 +5,16 @@ In Software Engineering, Structural Design Patterns are Design Patterns that ease the design by identifying a simple way to realize relationships between entities. -- `Adapter `__ - `:notebook: `__ -- `Bridge `__ - `:notebook: `__ -- `Composite `__ - `:notebook: `__ -- `DataMapper `__ - `:notebook: `__ -- `Decorator `__ - `:notebook: `__ -- `DependencyInjection `__ - `:notebook: `__ -- `Facade `__ - `:notebook: `__ -- `FluentInterface `__ - `:notebook: `__ -- `Proxy `__ - `:notebook: `__ -- `Registry `__ - `:notebook: `__ +.. toctree:: + :titlesonly: -Code ----- - -You can also find these code on `GitHub`_ - -Test ----- - -.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural + Adapter/index + Bridge/index + Composite/index + DataMapper/index + Decorator/index + DependencyInjection/index + Facade/index + FluentInterface/index + Proxy/index + Registry/index \ No newline at end of file diff --git a/conf.py b/conf.py index 5354e1f..c58ec9d 100644 --- a/conf.py +++ b/conf.py @@ -108,7 +108,7 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'sphinx-rtd-theme' +html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/index.rst b/index.rst index b7f75a2..7911c10 100644 --- a/index.rst +++ b/index.rst @@ -21,87 +21,14 @@ Please click on the `:notebook: `__ for a full explanation of the pattern on Wikipedia. -`Creational `__ -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. toctree:: + :titlesonly: + :numbered: -- `AbstractFactory `__ - `:notebook: `__ -- `Builder `__ - `:notebook: `__ -- `FactoryMethod `__ - `:notebook: `__ -- `Multiton `__ (is considered an anti-pattern! - :no\_entry:) -- `Pool `__ - `:notebook: `__ -- `Prototype `__ - `:notebook: `__ -- `SimpleFactory `__ -- `Singleton `__ - `:notebook: `__ (is - considered an anti-pattern! :no\_entry:) -- `StaticFactory `__ - -`Structural `__ -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- `Adapter `__ - `:notebook: `__ -- `Bridge `__ - `:notebook: `__ -- `Composite `__ - `:notebook: `__ -- `DataMapper `__ - `:notebook: `__ -- `Decorator `__ - `:notebook: `__ -- `DependencyInjection `__ - `:notebook: `__ -- `Facade `__ - `:notebook: `__ -- `FluentInterface `__ - `:notebook: `__ -- `Proxy `__ - `:notebook: `__ -- `Registry `__ - `:notebook: `__ - -`Behavioral `__ -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- `ChainOfResponsibilities `__ - `:notebook: `__ -- `Command `__ - `:notebook: `__ -- `Iterator `__ - `:notebook: `__ -- `Mediator `__ - `:notebook: `__ -- `Memento `__ - `:notebook: `__ -- `NullObject `__ - `:notebook: `__ -- `Observer `__ - `:notebook: `__ -- `Specification `__ - `:notebook: `__ -- `State `__ - `:notebook: `__ -- `Strategy `__ - `:notebook: `__ -- `TemplateMethod `__ - `:notebook: `__ -- `Visitor `__ - `:notebook: `__ - -`More `__ -~~~~~~~~~~~~~~~ - -- `Delegation `__ - `:notebook: `__ -- `ServiceLocator `__ - `:notebook: `__ -- `Repository `__ + Creational/index + Structural/index + Behavioral/index + More/index Contribute ----------