[ Index ]

PHP Cross Reference of phpBB-3.2.8-deutsch




/vendor/guzzlehttp/guzzle/src/Event/ -> ListenerAttacherTrait.php (summary)

Trait that provides methods for extract event listeners specified in an array and attaching them to an emitter owned by the object or one of its direct dependencies.

File Size: 88 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 functions


Functions that are not part of a class:

attachListeners(HasEmitterInterface $object, array $listeners)   X-Ref
Attaches event listeners and properly sets their priorities and whether
or not they are are only executed once.

param: HasEmitterInterface $object    Object that has the event emitter.
param: array               $listeners Array of hashes representing event

prepareListeners(array $source, array $events)   X-Ref
Extracts the allowed events from the provided array, and ignores anything
else in the array. The event listener must be specified as a callable or
as an array of event listener data ("name", "fn", "priority", "once").

param: array $source Array containing callables or hashes of data to be
param: array $events Names of events to look for in the provided $source
return: array

buildListener($name, $data, &$listeners)   X-Ref
Creates a complete event listener definition from the provided array of
listener data. Also works recursively if more than one listeners are
contained in the provided array.

param: string         $name      Name of the event the listener is for.
param: array|callable $data      Event listener data to prepare.
param: array          $listeners Array of listeners, passed by reference.

Generated: Sat Oct 26 11:28:42 2019 Cross-referenced by PHPXref 0.7.1