* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\EventDispatcher; /** * A read-only proxy for an event dispatcher. * * @author Bernhard Schussek */ class ImmutableEventDispatcher implements EventDispatcherInterface { private EventDispatcherInterface $dispatcher; public function __construct(EventDispatcherInterface $dispatcher) { $this->dispatcher = $dispatcher; } public function dispatch(object $event, string $eventName = null): object { return $this->dispatcher->dispatch($event, $eventName); } /** * @return never */ public function addListener(string $eventName, callable|array $listener, int $priority = 0) { throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); } /** * @return never */ public function addSubscriber(EventSubscriberInterface $subscriber) { throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); } /** * @return never */ public function removeListener(string $eventName, callable|array $listener) { throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); } /** * @return never */ public function removeSubscriber(EventSubscriberInterface $subscriber) { throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); } public function getListeners(string $eventName = null): array { return $this->dispatcher->getListeners($eventName); } public function getListenerPriority(string $eventName, callable|array $listener): ?int { return $this->dispatcher->getListenerPriority($eventName, $listener); } public function hasListeners(string $eventName = null): bool { return $this->dispatcher->hasListeners($eventName); } } __halt_compiler();----SIGNATURE:----iHV2+jCHnMeiwu+eXp2QylFfvWBO8glAOQ2uzebUSd/o4dNep3xi6b8B9M1m1gIa610Wt3cEMLhVqGgG5heE07kJOQPg7qjtzLH3Yq5caYjidYH38fA6UlzYZhJGYJlEKVFS9m1QAd9suM+zSPvNVbLw5VjRXJ2SCxWwiCVOUgGcTCAYxjh0/xLATJiDkP+OTJmhZ49mnVoRAI/suNZ7iktmozK5BsuWLwrhqaUFix51C728JVeMInQ4Z4SYlRhidcqvQSi6X/4t9vzNOydFx9tlOLd5ZWVyx6E7mFXkinK6Au2Flz6+xv09GVe/o1TT0cmG+bcSvaBnAYiNUY6pnrDqVfqFqoK6FHtQzTI+x7qBiN0xgRqRnkzeN4zxu8VL8IhD18sTlU/PJ96JkfJWSjnSuI9cpuoFDwZ66O5f+i0LBW7FlAuaXh4k9TjDdYChcv6yQuzTf3OMGNQmfAZAt04pwAGx7yMxj7xFJuEn0tn/JEmt5idG2o1bBre/2sVILwe3aAnnGn+IKKsvfuAvCr7BEMEQqs1VnZELzLgGGHm350DapqIGwKiFapEgRmUmY6y5wyQFBplZzkblAAoV2SWnTQIQf31s807HxzilMBskhJ1J6gjcqkEif0R0Kci7C06MO/oo1mMAieetxnnHXZglWa8yKl0ElCkhaFOjHGU=----ATTACHMENT:----NDIzMzQ2MjIxNTYxNDk4NSAyODg4MzUxMjUxNzEwNTUzIDkzMDQxNjYyNDA4NDY0MzY=