Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ImmutableEventDispatcher.php

function ImmutableEventDispatcher::addSubscriber

Overrides EventDispatcherInterface::addSubscriber

File

vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php, line 36

Class

ImmutableEventDispatcher
A read-only proxy for an event dispatcher.

Namespace

Symfony\Component\EventDispatcher

Code

public function addSubscriber(EventSubscriberInterface $subscriber) : never {
    throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal