Files
DesignPatternsPHP/Behavioral/Mediator/Colleague.php
Dominik Liebler 64e21e8581 PHP7 Mediator
2016-09-22 09:38:55 +02:00

26 lines
496 B
PHP

<?php
namespace DesignPatterns\Behavioral\Mediator;
/**
* Colleague is an abstract colleague who works together but he only knows
* the Mediator, not other colleagues
*/
abstract class Colleague
{
/**
* this ensures no change in subclasses.
*
* @var MediatorInterface
*/
protected $mediator;
/**
* @param MediatorInterface $mediator
*/
public function setMediator(MediatorInterface $mediator)
{
$this->mediator = $mediator;
}
}