@@ 51-60 (lines=10) @@ | ||
48 | /** |
|
49 | * @param EventInterface $event |
|
50 | */ |
|
51 | private function raiseInSelf(EventInterface $event) |
|
52 | { |
|
53 | $event_name = $this->getEventNameResolver()->getEventName($event); |
|
54 | $method = 'on' . $event_name; |
|
55 | ||
56 | // if method is not exists is not a critical error |
|
57 | if (method_exists($this, $method)) { |
|
58 | call_user_func([$this, $method], $event); |
|
59 | } |
|
60 | } |
|
61 | ||
62 | /** |
|
63 | * @param EventInterface $event |
@@ 46-54 (lines=9) @@ | ||
43 | /** |
|
44 | * @param EventInterface $event |
|
45 | */ |
|
46 | public function handle(EventInterface $event) |
|
47 | { |
|
48 | $event_name = $this->getEventNameResolver()->getEventName($event); |
|
49 | $method = 'handle' . $event_name; |
|
50 | ||
51 | if (method_exists($this, $method)) { |
|
52 | call_user_func([$this, $method], $event); |
|
53 | } |
|
54 | } |
|
55 | } |
|
56 |