mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-09-25 05:51:46 +02:00
26 lines
496 B
PHP
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;
|
|
}
|
|
}
|