1 | <?php |
||
48 | class Event extends ObjectAbstract implements EventInterface |
||
49 | { |
||
50 | /** |
||
51 | * event name |
||
52 | * |
||
53 | * @var string |
||
54 | * @access protected |
||
55 | */ |
||
56 | protected $name; |
||
57 | |||
58 | /** |
||
59 | * event target/context |
||
60 | * |
||
61 | * an object OR static class name (string) |
||
62 | * |
||
63 | * @var object|string|null |
||
64 | * @access protected |
||
65 | */ |
||
66 | protected $target; |
||
67 | |||
68 | /** |
||
69 | * event parameters |
||
70 | * |
||
71 | * @var array |
||
72 | * @access protected |
||
73 | */ |
||
74 | protected $parameters; |
||
75 | |||
76 | /** |
||
77 | * stop propagation |
||
78 | * |
||
79 | * @var bool |
||
80 | * @access protected |
||
81 | */ |
||
82 | protected $stopped = false; |
||
83 | |||
84 | /** |
||
85 | * Constructor |
||
86 | * |
||
87 | * @param string $eventName event name |
||
88 | * @param string|object|null $target event context, object or classname |
||
89 | * @param array $parameters (optional) event parameters |
||
90 | * @throws InvalidArgumentException if event name is invalid |
||
91 | * @access public |
||
92 | * @api |
||
93 | */ |
||
94 | public function __construct( |
||
103 | |||
104 | /** |
||
105 | * {@inheritDoc} |
||
106 | */ |
||
107 | public function getName() |
||
111 | |||
112 | /** |
||
113 | * {@inheritDoc} |
||
114 | */ |
||
115 | public function getTarget() |
||
119 | |||
120 | /** |
||
121 | * {@inheritDoc} |
||
122 | */ |
||
123 | public function getParams() |
||
127 | |||
128 | /** |
||
129 | * {@inheritDoc} |
||
130 | */ |
||
131 | public function getParam($name) |
||
138 | |||
139 | /** |
||
140 | * {@inheritDoc} |
||
141 | */ |
||
142 | public function setName($name) |
||
152 | |||
153 | /** |
||
154 | * {@inheritDoc} |
||
155 | */ |
||
156 | public function setTarget($target) |
||
160 | |||
161 | /** |
||
162 | * {@inheritDoc} |
||
163 | */ |
||
164 | public function setParams(array $params) |
||
168 | |||
169 | /** |
||
170 | * {@inheritDoc} |
||
171 | */ |
||
172 | public function stopPropagation($flag) |
||
176 | |||
177 | /** |
||
178 | * {@inheritDoc} |
||
179 | */ |
||
180 | public function isPropagationStopped() |
||
184 | } |
||
185 |