mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-10-02 17:28:17 +02:00
55 lines
735 B
ReStructuredText
55 lines
735 B
ReStructuredText
`Delegation`__
|
|
==============
|
|
|
|
Purpose
|
|
-------
|
|
|
|
...
|
|
|
|
Examples
|
|
--------
|
|
|
|
...
|
|
|
|
UML Diagram
|
|
-----------
|
|
|
|
.. image:: uml/uml.png
|
|
:alt: Alt Delegation UML Diagram
|
|
:align: center
|
|
|
|
Code
|
|
----
|
|
|
|
You can also find these code on `GitHub`_
|
|
|
|
Usage.php
|
|
|
|
.. literalinclude:: Usage.php
|
|
:language: php
|
|
:linenos:
|
|
|
|
TeamLead.php
|
|
|
|
.. literalinclude:: TeamLead.php
|
|
:language: php
|
|
:linenos:
|
|
|
|
JuniorDeveloper.php
|
|
|
|
.. literalinclude:: JuniorDeveloper.php
|
|
:language: php
|
|
:linenos:
|
|
|
|
Test
|
|
----
|
|
|
|
Tests/DelegationTest.php
|
|
|
|
.. literalinclude:: Tests/DelegationTest.php
|
|
:language: php
|
|
:linenos:
|
|
|
|
.. _`GitHub`: https://github.com/domnikl/DesignPatternsPHP/tree/master/More/Delegation
|
|
.. __: http://en.wikipedia.org/wiki/Delegation_pattern
|