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