1 | <?php |
||
15 | class TransitionEvent extends StateMachineEvent |
||
16 | { |
||
17 | /** |
||
18 | * @var TransitionInterface |
||
19 | */ |
||
20 | protected $transition; |
||
21 | |||
22 | /** |
||
23 | * @var bool |
||
24 | */ |
||
25 | protected $transitionRejected = false; |
||
26 | |||
27 | /** |
||
28 | * @var StateInterface |
||
29 | */ |
||
30 | protected $initialState; |
||
31 | |||
32 | /** |
||
33 | * @var array |
||
34 | */ |
||
35 | protected $properties; |
||
36 | |||
37 | /** |
||
38 | * @param StateInterface $initialState |
||
39 | * @param TransitionInterface $transition |
||
40 | * @param StateMachine $stateMachine |
||
41 | * @param array $properties |
||
42 | */ |
||
43 | 75 | public function __construct( |
|
59 | |||
60 | /** |
||
61 | * @return TransitionInterface |
||
62 | */ |
||
63 | 20 | public function getTransition() |
|
67 | |||
68 | /** |
||
69 | * @return bool |
||
70 | */ |
||
71 | 50 | public function isRejected() |
|
75 | |||
76 | 5 | public function reject() |
|
80 | |||
81 | /** |
||
82 | * @return StateInterface |
||
83 | */ |
||
84 | 20 | public function getInitialState() |
|
88 | |||
89 | /** |
||
90 | * @param string $property |
||
91 | * |
||
92 | * @return bool |
||
93 | */ |
||
94 | 5 | public function has($property) |
|
98 | |||
99 | /** |
||
100 | * @param string $property |
||
101 | * @param mixed $default |
||
102 | * |
||
103 | * @return mixed |
||
104 | */ |
||
105 | 5 | public function get($property, $default = null) |
|
109 | |||
110 | /** |
||
111 | * @return array |
||
112 | */ |
||
113 | 5 | public function getProperties() |
|
117 | } |
||
118 |