EventManager/GlobalEventManager.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_EventManager
\Zend_EventManager_GlobalEventManager
Package: Zend_EventManager
Event manager: notification system
Use the EventManager when you want to create a per-instance notification
system for your objects.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
Methods
attach(string $event, callback $callback, int $priority = 1) : \Zend_Stdlib_CallbackHandler
static
Attach a listener to an event
Parameters
Returns
Name | Type | Description |
---|---|---|
$event | string | |
$callback | callback | |
$priority | int |
Type | Description |
---|---|
\Zend_Stdlib_CallbackHandler |
clearListeners(string $event) : void
static
Clear all listeners for a given event
Parameters
Name | Type | Description |
---|---|---|
$event | string |
detach(\Zend_Stdlib_CallbackHandler $listener) : bool
static
Detach a callback from a listener
Parameters
Returns
Name | Type | Description |
---|---|---|
$listener | \Zend_Stdlib_CallbackHandler |
Type | Description |
---|---|
bool |
getListeners(string $event) : \Zend_Stdlib_PriorityQueue | array
static
Retrieve all listeners for a given event
Parameters
Returns
Name | Type | Description |
---|---|---|
$event | string |
Type | Description |
---|---|
\Zend_Stdlib_PriorityQueue | array |
setEventCollection(null | \Zend_EventManager_EventCollection $events = null) : void
static
Set the event collection on which this will operate
Parameters
Name | Type | Description |
---|---|---|
$events | null | \Zend_EventManager_EventCollection |
trigger(string $event, object | string $context, array | object $argv = array()) : \Zend_EventManager_ResponseCollection
static
Trigger an event
Parameters
Returns
Name | Type | Description |
---|---|---|
$event | string | |
$context | object | string | |
$argv | array | object |
Type | Description |
---|---|
\Zend_EventManager_ResponseCollection |
triggerUntil(string $event, string | object $context, array | object $argv, callback $callback) : \Zend_EventManager_ResponseCollection
static
Trigger listeenrs until return value of one causes a callback to evaluate to true.
Parameters
Returns
Name | Type | Description |
---|---|---|
$event | string | |
$context | string | object | |
$argv | array | object | |
$callback | callback |
Type | Description |
---|---|
\Zend_EventManager_ResponseCollection |