mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-01 12:40:11 +02:00
Further explaining the pattern
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
Purpose
|
||||
-------
|
||||
|
||||
Demonstrate the Delegator pattern.
|
||||
Demonstrate the Delegator pattern, where an object, instead of performing one of its stated tasks, delegates that task to an associated helper object. In this case TeamLead professes to writeCode and Usage uses this, while TeamLead delegates writeCode to JuniorDeveloper's writeBadCode function. This inverts the responsibility so that Usage is unknowingly executing writeBadCode.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
Reference in New Issue
Block a user