ContainerAwareEventDispatcher::hasListeners()

bool hasListeners(string $eventName = null) Checks whether an event has any registered listeners. Parameters string $eventName The name of the event Return Value bool true if the specified event has any listeners, false otherwise

ContainerAwareEventDispatcher::getListeners()

array getListeners(string $eventName = null) Gets the listeners of a specific event or all listeners sorted by descending priority. Parameters string $eventName The name of the event Return Value array The event listeners for the specified event, or all event listeners by event name

ContainerAwareEventDispatcher::addSubscriberService()

addSubscriberService(string $serviceId, string $class) Adds a service as event subscriber. Parameters string $serviceId The service ID of the subscriber service string $class The service's class name (which must implement EventSubscriberInterface)

ContainerAwareEventDispatcher::getContainer()

getContainer()

ContainerAwareEventDispatcher::getListenerPriority()

int|null getListenerPriority(string $eventName, callable $listener) Gets the listener priority for a specific event. Returns null if the event or the listener does not exist. Parameters string $eventName The name of the event callable $listener The listener Return Value int|null The event listener priority

ContainerAwareEventDispatcher::removeListener()

removeListener(string $eventName, callable $listener) Removes an event listener from the specified events. Parameters string $eventName The event to remove a listener from callable $listener The listener to remove

ContainerAwareEventDispatcher::addListenerService()

addListenerService(string $eventName, array $callback, int $priority) Adds a service as event listener. Parameters string $eventName Event for which the listener is added array $callback The service ID of the listener service & the method name that has to be called int $priority The higher this value, the earlier an event listener will be triggered in the chain. Defaults to 0. Exceptions InvalidArgumentException

ContainerAwareEventDispatcher

class ContainerAwareEventDispatcher extends EventDispatcher Lazily loads listeners and subscribers from the dependency injection container. Methods Event dispatch(string $eventName, Event $event = null) Dispatches an event to all registered listeners. from EventDispatcher array getListeners(string $eventName = null) Gets the listeners of a specific event or all listeners sorted by descending priority. int|null getListenerPriority(string $eventName, callable $listener) Gets the l

ContainerAwareCommand

class ContainerAwareCommand extends Command implements ContainerAwareInterface Command. Methods __construct(string|null $name = null) Constructor. from Command ignoreValidationErrors() Ignores validation errors. from Command setApplication(Application $application = null) Sets the application instance for this command. from Command setHelperSet(HelperSet $helperSet) Sets the helper set. from Command HelperSet getHelperSet() Gets the helper set. from Command Application

Container::underscore()

static string underscore(string $id) A string to underscore. Parameters string $id The string to underscore Return Value string The underscored string