1 | <?php |
||
53 | class Event extends ObjectAbstract implements EventInterface, \ArrayAccess |
||
54 | { |
||
55 | /** |
||
56 | * event name |
||
57 | * |
||
58 | * @var string |
||
59 | * @access protected |
||
60 | */ |
||
61 | protected $name; |
||
62 | |||
63 | /** |
||
64 | * event target/context |
||
65 | * |
||
66 | * an object OR static class name (string) |
||
67 | * |
||
68 | * @var object|string|null |
||
69 | * @access protected |
||
70 | */ |
||
71 | protected $target; |
||
72 | |||
73 | /** |
||
74 | * event parameters |
||
75 | * |
||
76 | * @var array |
||
77 | * @access protected |
||
78 | */ |
||
79 | protected $parameters; |
||
80 | |||
81 | /** |
||
82 | * stop propagation |
||
83 | * |
||
84 | * @var bool |
||
85 | * @access protected |
||
86 | */ |
||
87 | protected $stopped = false; |
||
88 | |||
89 | /** |
||
90 | * Constructor |
||
91 | * |
||
92 | * @param string $eventName event name |
||
93 | * @param string|object|null $target event context, object or classname |
||
94 | * @param array $parameters (optional) event parameters |
||
95 | * @throws InvalidArgumentException if event name is invalid |
||
96 | * @access public |
||
97 | * @api |
||
98 | */ |
||
99 | public function __construct( |
||
108 | |||
109 | /** |
||
110 | * {@inheritDoc} |
||
111 | */ |
||
112 | public function getName() |
||
116 | |||
117 | /** |
||
118 | * {@inheritDoc} |
||
119 | */ |
||
120 | public function getTarget() |
||
124 | |||
125 | /** |
||
126 | * {@inheritDoc} |
||
127 | */ |
||
128 | public function getParams() |
||
132 | |||
133 | /** |
||
134 | * {@inheritDoc} |
||
135 | */ |
||
136 | public function getParam($name) |
||
143 | |||
144 | /** |
||
145 | * {@inheritDoc} |
||
146 | */ |
||
147 | public function setName($name) |
||
157 | |||
158 | /** |
||
159 | * {@inheritDoc} |
||
160 | */ |
||
161 | public function setTarget($target) |
||
165 | |||
166 | /** |
||
167 | * {@inheritDoc} |
||
168 | */ |
||
169 | public function setParams(array $params) |
||
173 | |||
174 | /** |
||
175 | * {@inheritDoc} |
||
176 | */ |
||
177 | public function stopPropagation($flag) |
||
181 | |||
182 | /** |
||
183 | * {@inheritDoc} |
||
184 | */ |
||
185 | public function isPropagationStopped() |
||
189 | |||
190 | /** |
||
191 | * {@inheritDoc} |
||
192 | */ |
||
193 | public function offsetExists($offset)/*# : bool */ |
||
197 | |||
198 | /** |
||
199 | * {@inheritDoc} |
||
200 | */ |
||
201 | public function offsetGet($offset) |
||
205 | |||
206 | /** |
||
207 | * {@inheritDoc} |
||
208 | */ |
||
209 | public function offsetSet($offset, $value) |
||
213 | |||
214 | /** |
||
215 | * {@inheritDoc} |
||
216 | */ |
||
217 | public function offsetUnset($offset) |
||
221 | } |
||
222 |