PHP Класс izzum\examples\trafficlight\rules\CanSwitch

It only has knowledge about a traffic light domain model and no knowledge about any statemachine. The TrafficLight instance will be injected at runtime via the statemachine that makes use of the EntityBuilderTrafficLight. A rule should never have side effects. instead, it should only check if some condition is true or false.
Наследование: extends izzum\rules\Rule
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( TrafficLight $light ) constructor. get the domain object injected

Защищенные методы

Метод Описание
_applies ( ) overriden method with the correct implementation for our domain logic {@inheritDoc}

Описание методов

__construct() публичный Метод

constructor. get the domain object injected
public __construct ( TrafficLight $light )
$light izzum\examples\trafficlight\TrafficLight

_applies() защищенный Метод

overriden method with the correct implementation for our domain logic {@inheritDoc}
protected _applies ( )