| 1 | <?php |
||
| 13 | class OnEnterObserver implements \SplObserver |
||
| 14 | { |
||
| 15 | const DEFAULT_EVENT_NAME = 'onEnter'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $eventName; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param string $eventName |
||
| 24 | */ |
||
| 25 | 1 | public function __construct($eventName = self::DEFAULT_EVENT_NAME) |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @see SplObserver::update() |
||
| 32 | */ |
||
| 33 | 1 | public function update(\SplSubject $stateMachine) |
|
| 39 | |||
| 40 | /** |
||
| 41 | * @param \SplSubject|StatemachineInterface|Statemachine $stateMachine |
||
| 42 | * @return \ArrayAccess|null |
||
| 43 | */ |
||
| 44 | 1 | private function getStateMachineContext($stateMachine) |
|
| 53 | } |
||
| 54 |