Files
DesignPatternsPHP/Behavioral/Mediator/Colleague.php
2019-08-17 21:58:04 +02:00

27 lines
521 B
PHP

<?php
declare(strict_types=1);
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;
}
}