src/Listener/SwitchListenerTrait.php 1 location
|
@@ 20-28 (lines=9) @@
|
17 |
|
/** |
18 |
|
* @param EventInterface $event |
19 |
|
*/ |
20 |
|
public function handle(EventInterface $event) |
21 |
|
{ |
22 |
|
$method = $this->getMethodNameFromEvent($event); |
23 |
|
|
24 |
|
// if method is not exists is not a critical error |
25 |
|
if (method_exists($this, $method)) { |
26 |
|
call_user_func([$this, $method], $event); |
27 |
|
} |
28 |
|
} |
29 |
|
|
30 |
|
/** |
31 |
|
* Get handler method name from event. |
src/Aggregator/AggregateEventsRaiseInSelfTrait.php 1 location
|
@@ 46-54 (lines=9) @@
|
43 |
|
/** |
44 |
|
* @param EventInterface $event |
45 |
|
*/ |
46 |
|
private function raiseInSelf(EventInterface $event) |
47 |
|
{ |
48 |
|
$method = $this->getMethodNameFromEvent($event); |
49 |
|
|
50 |
|
// if method is not exists is not a critical error |
51 |
|
if (method_exists($this, $method)) { |
52 |
|
call_user_func([$this, $method], $event); |
53 |
|
} |
54 |
|
} |
55 |
|
|
56 |
|
/** |
57 |
|
* @param EventInterface $event |