* * 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:----Y5hfSfJaaBDaDfEM7JcipRzExZPnobermcHpmKcg4aLDv2bSKT+ZKilnlkICh7gLk5tit3vaxyXwMiNauBsLR425qExmxc7GzlK1uAXhYK42NtX0wPU7Y+6hgTS8rrv4NglTsG3deBF+7Ft/BtkVZWmrj3htww8jGuyjyxezKnqeyhTF6FI8pjh3NT1n1MoaUcG/FmJXByiDGDefCfoy63m2pQSKIdcgN/zZCni/sb101XjmWIfLKLBoPqo4SlIdRxnzl8ONOoJzOa5wAoVSvG2lVWE+qbygCyPr9pEmg+x4Wv8b05dxNlzG/TawBxR3W8Y7bAXLEJGRH/F4vaQxReHDRIhPWj5EyI2/kv3vHTS0Yga1qL7gxS+QsJfX37P0aUXkgoyAN7FHUwqTEh+kx7DrKngBedpKQwqkFY4EtbhjZ7yg8QwhT7VXxC03AuznqWsLNQE1Xe1GP33OftONYNvcrYx3pQGDyud/wAJ+o97UlZidpmTCfsX+lg47i7G+rlrfYSxUu+jI01i3QgODk+2n4/v4yHWoz8v7NxueqfyZwgDfUTRUi7EQta3qPQriPTDPxQmCAsj3ymASHH8fp8Ewc4yDpDqF4gyG24om6sOFPRslkhRxZEa2J9caUqe4Z6vR/jC2tsayvCWj2BdPoa46weKT/4W3aZaln9888lk=----ATTACHMENT:----NjQ1NDE4OTg2Nzk2MzI3IDQ3MTg0NjIzNjk5ODUwNDMgNzQ0OTg2MzY1MDIzMjc1Nw==