Delegation pattern

This commit is contained in:
maximkou
2014-03-02 21:54:04 +04:00
parent 912bd0c003
commit adec443d9c
4 changed files with 74 additions and 0 deletions

9
Delegation/Usage.php Normal file
View File

@@ -0,0 +1,9 @@
<?php
namespace DesignPatterns\Delegation;
// instantiate TeamLead and appoint to assistants JuniorDeveloper
$teamLead = new TeamLead(new JuniorDeveloper());
// team lead delegate write code to junior developer
echo $teamLead->writeCode();