[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Source view] [Print] [Project Stats]
Zend Framework (http://framework.zend.com/)
Copyright: | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
License: | http://framework.zend.com/license/new-bsd New BSD License |
File Size: | 526 lines (17 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
EventManager:: (21 methods):
__construct()
setEventClass()
setSharedManager()
unsetSharedManager()
getSharedManager()
getIdentifiers()
setIdentifiers()
addIdentifiers()
trigger()
triggerUntil()
attach()
attachAggregate()
detach()
detachAggregate()
getEvents()
getListeners()
clearListeners()
prepareArgs()
triggerListeners()
getSharedListeners()
insertListeners()
Class: EventManager - X-Ref
Event manager: notification system__construct($identifiers = null) X-Ref |
Constructor Allows optionally specifying identifier(s) to use to pull signals from a SharedEventManagerInterface. param: null|string|int|array|Traversable $identifiers |
setEventClass($class) X-Ref |
Set the event class to utilize param: string $class return: EventManager |
setSharedManager(SharedEventManagerInterface $sharedEventManager) X-Ref |
Set shared event manager param: SharedEventManagerInterface $sharedEventManager return: EventManager |
unsetSharedManager() X-Ref |
Remove any shared event manager currently attached return: void |
getSharedManager() X-Ref |
Get shared event manager If one is not defined, but we have a static instance in StaticEventManager, that one will be used and set in this instance. If none is available in the StaticEventManager, a boolean false is returned. return: false|SharedEventManagerInterface |
getIdentifiers() X-Ref |
Get the identifier(s) for this EventManager return: array |
setIdentifiers($identifiers) X-Ref |
Set the identifiers (overrides any currently set identifiers) param: string|int|array|Traversable $identifiers return: EventManager Provides a fluent interface |
addIdentifiers($identifiers) X-Ref |
Add some identifier(s) (appends to any currently set identifiers) param: string|int|array|Traversable $identifiers return: EventManager Provides a fluent interface |
trigger($event, $target = null, $argv = array() X-Ref |
Trigger all listeners for a given event param: string|EventInterface $event param: string|object $target Object calling emit, or symbol describing target (such as static method name) param: array|ArrayAccess $argv Array of arguments; typically, should be associative param: null|callable $callback Trigger listeners until return value of this callback evaluate to true return: ResponseCollection All listener return values |
triggerUntil($event, $target, $argv = null, $callback = null) X-Ref |
Trigger listeners until return value of one causes a callback to evaluate to true Triggers listeners until the provided callback evaluates the return value of one as true, or until all listeners have been executed. param: string|EventInterface $event param: string|object $target Object calling emit, or symbol describing target (such as static method name) param: array|ArrayAccess $argv Array of arguments; typically, should be associative param: callable $callback return: ResponseCollection |
attach($event, $callback = null, $priority = 1) X-Ref |
Attach a listener to an event The first argument is the event, and the next argument describes a callback that will respond to that event. A CallbackHandler instance describing the event listener combination will be returned. The last argument indicates a priority at which the event should be executed. By default, this value is 1; however, you may set it for any integer value. Higher values have higher priority (i.e., execute first). You can specify "*" for the event name. In such cases, the listener will be triggered for every event. param: string|array|ListenerAggregateInterface $event An event or array of event names. If a ListenerAggregateInterface, proxies to {@link attachAggregate()}. param: callable|int $callback If string $event provided, expects PHP callback; for a ListenerAggregateInterface $event, this will be the priority param: int $priority If provided, the priority at which to register the callable return: CallbackHandler|mixed CallbackHandler if attaching callable (to allow later unsubscribe); mixed if attaching aggregate |
attachAggregate(ListenerAggregateInterface $aggregate, $priority = 1) X-Ref |
Attach a listener aggregate Listener aggregates accept an EventManagerInterface instance, and call attach() one or more times, typically to attach to multiple events using local methods. param: ListenerAggregateInterface $aggregate param: int $priority If provided, a suggested priority for the aggregate to use return: mixed return value of {@link ListenerAggregateInterface::attach()} |
detach($listener) X-Ref |
Unsubscribe a listener from an event param: CallbackHandler|ListenerAggregateInterface $listener return: bool Returns true if event and listener found, and unsubscribed; returns false if either event or listener not found |
detachAggregate(ListenerAggregateInterface $aggregate) X-Ref |
Detach a listener aggregate Listener aggregates accept an EventManagerInterface instance, and call detach() of all previously attached listeners. param: ListenerAggregateInterface $aggregate return: mixed return value of {@link ListenerAggregateInterface::detach()} |
getEvents() X-Ref |
Retrieve all registered events return: array |
getListeners($event) X-Ref |
Retrieve all listeners for a given event param: string $event return: PriorityQueue |
clearListeners($event) X-Ref |
Clear all listeners for a given event param: string $event return: void |
prepareArgs(array $args) X-Ref |
Prepare arguments Use this method if you want to be able to modify arguments from within a listener. It returns an ArrayObject of the arguments, which may then be passed to trigger(). param: array $args return: ArrayObject |
triggerListeners($event, EventInterface $e, $callback = null) X-Ref |
Trigger listeners Actual functionality for triggering listeners, to which trigger() delegate. param: string $event Event name param: EventInterface $e param: null|callable $callback return: ResponseCollection |
getSharedListeners($event) X-Ref |
Get list of all listeners attached to the shared event manager for identifiers registered by this instance param: string $event return: array |
insertListeners($masterListeners, $listeners) X-Ref |
Add listeners to the master queue of listeners Used to inject shared listeners and wildcard listeners. param: PriorityQueue $masterListeners param: array|Traversable $listeners return: void |
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |