Property | Type | Description | |
---|---|---|---|
$events | array | Current queue of events |
Method | Description | |
---|---|---|
__construct ( ) : void | Constructor to initialize the event queue. | |
addEvent ( Phergie_Plugin_Abstract $plugin, string $type, array $args = [] ) : Phergie_Event_Handler | Adds an event to the queue. | |
clearEvents ( ) : Phergie_Event_Handler | Clears the event queue. | |
count ( ) : integer | Returns the number of events in the event queue | |
getEvents ( ) : array | Returns the current event queue. | |
getEventsOfType ( string $type ) : array | Returns a list of events of a specified type. | |
getIterator ( ) : ArrayIterator | Returns an iterator for the current event queue. | |
hasEventOfType ( string $type ) : boolean | Returns whether an event of the given type exists in the queue. | |
removeEvent ( Phergie_Event_Command $event ) : Phergie_Event_Handler | Removes a single event from the event queue. | |
replaceEvents ( array $events ) : Phergie_Event_Handler | Replaces the current event queue with a given queue of events. |
public __construct ( ) : void | ||
return | void |
public addEvent ( Phergie_Plugin_Abstract $plugin, string $type, array $args = [] ) : Phergie_Event_Handler | ||
$plugin | Phergie_Plugin_Abstract | Plugin originating the event |
$type | string | Event type, corresponding to a Phergie_Event_Command::TYPE_* constant |
$args | array | Optional event arguments |
return | Phergie_Event_Handler | Provides a fluent interface |
public clearEvents ( ) : Phergie_Event_Handler | ||
return | Phergie_Event_Handler | Provides a fluent interface |
public getEventsOfType ( string $type ) : array | ||
$type | string | Event type from Phergie_Event_Request::TYPE_* constants |
return | array | Array containing event instances of the specified type or an empty array if no such events were found |
public getIterator ( ) : ArrayIterator | ||
return | ArrayIterator |
public hasEventOfType ( string $type ) : boolean | ||
$type | string | Event type from Phergie_Event_Request::TYPE_* constants |
return | boolean | TRUE if an event of the specified type exists in the queue, FALSE otherwise |
public removeEvent ( Phergie_Event_Command $event ) : Phergie_Event_Handler | ||
$event | Phergie_Event_Command | Event to remove |
return | Phergie_Event_Handler | Provides a fluent interface |
public replaceEvents ( array $events ) : Phergie_Event_Handler | ||
$events | array | Ordered list of objects of the class Phergie_Event_Command |
return | Phergie_Event_Handler | Provides a fluent interface |