| @@ 144-155 (lines=12) @@ | ||
| 141 | * |
|
| 142 | * @return EventDispatcherInterface |
|
| 143 | */ |
|
| 144 | public function getEventDispatcher() |
|
| 145 | { |
|
| 146 | if (!$this->eventDispatcher) { |
|
| 147 | if (class_exists(LegacyEventDispatcherProxy::class)) { |
|
| 148 | $this->eventDispatcher = LegacyEventDispatcherProxy::decorate(new EventDispatcher()); |
|
| 149 | } else { |
|
| 150 | $this->eventDispatcher = new EventDispatcher(); |
|
| 151 | } |
|
| 152 | } |
|
| 153 | ||
| 154 | return $this->eventDispatcher; |
|
| 155 | } |
|
| 156 | ||
| 157 | /** |
|
| 158 | * Invalidate a path or URL. |
|
| @@ 56-67 (lines=12) @@ | ||
| 53 | * |
|
| 54 | * @return EventDispatcherInterface |
|
| 55 | */ |
|
| 56 | public function getEventDispatcher() |
|
| 57 | { |
|
| 58 | if (!$this->eventDispatcher) { |
|
| 59 | if (class_exists(LegacyEventDispatcherProxy::class)) { |
|
| 60 | $this->eventDispatcher = LegacyEventDispatcherProxy::decorate(new EventDispatcher()); |
|
| 61 | } else { |
|
| 62 | $this->eventDispatcher = new EventDispatcher(); |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||
| 66 | return $this->eventDispatcher; |
|
| 67 | } |
|
| 68 | ||
| 69 | /** |
|
| 70 | * Add an event subscriber. |
|