EventManager/GlobalEventManager.php

Show: inherited
Table of Contents

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

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

Properties

Propertyprotected\Zend_EventManager_EventCollection $events =
static

Methods

methodpublicattach(string $event, callback $callback, int $priority = 1) : \Zend_Stdlib_CallbackHandler
static

Attach a listener to an event

Parameters
Name Type Description
$event string
$callback callback
$priority int
Returns
Type Description
\Zend_Stdlib_CallbackHandler
methodpublicclearListeners(string $event) : void
static

Clear all listeners for a given event

Parameters
Name Type Description
$event string
methodpublicdetach(\Zend_Stdlib_CallbackHandler $listener) : bool
static

Detach a callback from a listener

Parameters
Name Type Description
$listener \Zend_Stdlib_CallbackHandler
Returns
Type Description
bool
methodpublicgetEventCollection() : void
static

Get event collection on which this operates

methodpublicgetEvents() : array
static

Retrieve list of events this object manages

Returns
Type Description
array
methodpublicgetListeners(string $event) : \Zend_Stdlib_PriorityQueue | array
static

Retrieve all listeners for a given event

Parameters
Name Type Description
$event string
Returns
Type Description
\Zend_Stdlib_PriorityQueue | array
methodpublicsetEventCollection(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
methodpublictrigger(string $event, object | string $context, array | object $argv = array()) : \Zend_EventManager_ResponseCollection
static

Trigger an event

Parameters
Name Type Description
$event string
$context object | string
$argv array | object
Returns
Type Description
\Zend_EventManager_ResponseCollection
methodpublictriggerUntil(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
Name Type Description
$event string
$context string | object
$argv array | object
$callback callback
Returns
Type Description
\Zend_EventManager_ResponseCollection
Documentation was generated by phpDocumentor 2.0.0a8.