* * 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:----d4jUZYT5xPc/iXXh7sImhNBlup4BBg8aN8f1FDCrrwpHT5SLFcbdaOvSfU/mbKM+nmhHQtr2hze+xMW9HtMW2cUEIC208MjzNdmBIBpDqdHP6y4o9SlRbwQO9IO7c1F63AyZRDqBeLOS/dmnpzO3kVB2+InAt2s95OkkQhPcNLEgSIFEEcPO0DY11j+a6/4nRef56EbqLT/GmPtceke74sEG8Y5bCk50uQxJR6FXJAIEn7PvPblqW3FBEdGLIP37E5VU3M1AjgHWi38lVV5uONCipaYLVlFbssj/EKgWk087Xr9C3UhtvBBJ+6uUlN5LQKx02p6w3ZuWRwQhba/QBCTr1oh4Hn45I0DfXVzjPrGkUapA040cdWccfnHnOAXk+yfmnbwnhE4nEeGyQLzmVzPD7t5UdugB7XQp2AYGxLs1zUAOVrTBkxx+RhbwwaENrbyjmZ1x05RSaY+CcPw95mbzfN3lBhWQbS742K6QJ5WCJ95OCLpwgfuxPN6ERrHs1OBGOJu5pGLaP7cAnynSUfPCD6V1hp1H2R24k8fxTY6FUN0tKGkbSAsme4y25w7zapTauVAZ/TB4Fi3AAfJLMJkj6ActAABgbcThYDTlcUTnN8LHAXEtEqV3XP5GDbCgXW/sejyNH76lZs+UnGdk/+KNhkGYv5QUBQNdr/WvfQI=----ATTACHMENT:----MjIwNTcxMDY5NTE1NzQ5MiA4MTgyMTQ4OTgwNjk3Nzk2IDUzOTYyOTkwMTcyNzU2OTM=