Fully Qualified Name: | Laminas\EventManager\SharedEventManagerInterface |
Interface for shared event listener collections
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 |
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:
Clear all listeners for a given identifier, optionally for a specific event
Parameter Name | Type | Description |
---|---|---|
$identifier | string | |
$eventName | null|string |
Returns:
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:
Retrieve all listeners for given identifiers
Parameter Name | Type | Description |
---|---|---|
$identifiers | array | |
$eventName | string |
Returns: array