mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-16 20:03:58 +02:00
Change index.rst to README.rst
remove all pattern's README.md
This commit is contained in:
74
Structural/Bridge/README.rst
Normal file
74
Structural/Bridge/README.rst
Normal file
@@ -0,0 +1,74 @@
|
||||
`Bridge`_
|
||||
=========
|
||||
|
||||
Purpose
|
||||
-------
|
||||
|
||||
Decouple an abstraction from its implementation so that the two can vary
|
||||
independently. (http://en.wikipedia.org/wiki/Bridge\_pattern)
|
||||
|
||||
Sample:
|
||||
^^^^^^^
|
||||
|
||||
- `Symfony
|
||||
DoctrineBridge <https://github.com/symfony/DoctrineBridge>`__
|
||||
|
||||
UML Diagram
|
||||
-----------
|
||||
|
||||
.. image:: uml/uml.png
|
||||
:alt: Alt Bridge UML Diagram
|
||||
:align: center
|
||||
|
||||
Code
|
||||
----
|
||||
|
||||
You can also find these code on `GitHub`_
|
||||
|
||||
Assemble.php
|
||||
|
||||
.. literalinclude:: Assemble.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
Workshop.php
|
||||
|
||||
.. literalinclude:: Workshop.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
Car.php
|
||||
|
||||
.. literalinclude:: Car.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
Motorcycle.php
|
||||
|
||||
.. literalinclude:: Motorcycle.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
Vehicle.php
|
||||
|
||||
.. literalinclude:: Vehicle.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
Produce.php
|
||||
|
||||
.. literalinclude:: Produce.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
Test
|
||||
----
|
||||
|
||||
Tests/BridgeTest.php
|
||||
|
||||
.. literalinclude:: Tests/BridgeTest.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/Bridge
|
||||
.. _`Bridge`: http://en.wikipedia.org/wiki/Bridge_pattern
|
Reference in New Issue
Block a user