Interface SharedEventManagerInterface

Summary

Fully Qualified Name: Zend\EventManager\SharedEventManagerInterface

Description

Interface for shared event listener collections

Methods

Name Description Defined By
attach() Attach a listener to an event emitted by components with specific identifiers. SharedEventManagerInterface
clearListeners() Clear all listeners for a given identifier, optionally for a specific event SharedEventManagerInterface
detach() Detach a shared listener. SharedEventManagerInterface
getListeners() Retrieve all listeners for given identifiers SharedEventManagerInterface

Method Details

attach()

Attach a listener to an event emitted by components with specific identifiers.

Parameter Name Type Description
$identifier string Identifier
$eventName string
$listener callable Listener
$priority int Priority

Returns:

clearListeners()

Clear all listeners for a given identifier, optionally for a specific event

Parameter Name Type Description
$identifier string
$eventName null|string

Returns:

detach()

Detach a shared listener.

Allows detaching a listener from one or more events to which it may be attached.

Parameter Name Type Description
$listener callable Listener
$identifier null|string Identifier
$eventName null|string Event

Returns:

getListeners()

Retrieve all listeners for given identifiers

Parameter Name Type Description
$identifiers array
$eventName string

Returns: array

Top