Skip to content

Latest commit

 

History

History
 
 

Bridge

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Purpose

Decouple an abstraction from its implementation so that the two can vary independently. (http://en.wikipedia.org/wiki/Bridge_pattern)

Sample:

UML Diagram

Alt Bridge UML Diagram

Code

You can also find these code on GitHub

Workshop.php

.. literalinclude:: Workshop.php
   :language: php
   :linenos:

Assemble.php

.. literalinclude:: Assemble.php
   :language: php
   :linenos:

Produce.php

.. literalinclude:: Produce.php
   :language: php
   :linenos:

Vehicle.php

.. literalinclude:: Vehicle.php
   :language: php
   :linenos:

Motorcycle.php

.. literalinclude:: Motorcycle.php
   :language: php
   :linenos:

Car.php

.. literalinclude:: Car.php
   :language: php
   :linenos:

Test

Tests/BridgeTest.php

.. literalinclude:: Tests/BridgeTest.php
   :language: php
   :linenos: