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-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_EventManager
\Zend_EventManager_GlobalEventManager
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-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
Methods

attach(string $event, callback $callback, int $priority = 1) : \Zend_Stdlib_CallbackHandlerAttach a listener to an event
| Name | Type | Description |
|---|---|---|
| $event | string | |
| $callback | callback | |
| $priority | int |
| Type | Description |
|---|---|
| \Zend_Stdlib_CallbackHandler |

clearListeners(string $event) : voidClear all listeners for a given event
| Name | Type | Description |
|---|---|---|
| $event | string |

detach(\Zend_Stdlib_CallbackHandler $listener) : boolDetach a callback from a listener
| Name | Type | Description |
|---|---|---|
| $listener | \Zend_Stdlib_CallbackHandler |
| Type | Description |
|---|---|
| bool |

getEvents() : arrayRetrieve list of events this object manages
| Type | Description |
|---|---|
| array |

getListeners(string $event) : \Zend_Stdlib_PriorityQueue | arrayRetrieve all listeners for a given event
| Name | Type | Description |
|---|---|---|
| $event | string |
| Type | Description |
|---|---|
| \Zend_Stdlib_PriorityQueue | array |

setEventCollection(null | \Zend_EventManager_EventCollection $events = null) : voidSet the event collection on which this will operate
| Name | Type | Description |
|---|---|---|
| $events | null | \Zend_EventManager_EventCollection |

trigger(string $event, object | string $context, array | object $argv = array()) : \Zend_EventManager_ResponseCollectionTrigger an event
| 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_ResponseCollectionTrigger listeenrs until return value of one causes a callback to evaluate to true.
| Name | Type | Description |
|---|---|---|
| $event | string | |
| $context | string | object | |
| $argv | array | object | |
| $callback | callback |
| Type | Description |
|---|---|
| \Zend_EventManager_ResponseCollection |