10 lines
248 B
PHP
Raw Normal View History

2014-03-02 21:54:04 +04:00
<?php
namespace DesignPatterns\More\Delegation;
2014-03-02 21:54:04 +04:00
// instantiate TeamLead and appoint to assistants JuniorDeveloper
$teamLead = new TeamLead(new JuniorDeveloper());
// team lead delegate write code to junior developer
echo $teamLead->writeCode();