mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-28 10:40:17 +02:00
@@ -14,13 +14,7 @@ abstract class Colleague
|
||||
* @var MediatorInterface
|
||||
*/
|
||||
private $mediator;
|
||||
|
||||
// for subclasses
|
||||
protected function getMediator()
|
||||
{
|
||||
return $this->mediator;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param MediatorInterface $medium
|
||||
*/
|
||||
@@ -29,4 +23,10 @@ abstract class Colleague
|
||||
// in this way, we are sure the concrete colleague knows the mediator
|
||||
$this->mediator = $medium;
|
||||
}
|
||||
|
||||
// for subclasses
|
||||
protected function getMediator()
|
||||
{
|
||||
return $this->mediator;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user