EventList
in package
implements
ArrayAccess, Countable
The Event List
Table of Contents
Interfaces
- ArrayAccess
- Countable
Properties
- $_events : array<string|int, EventInterface>
- Events list
Methods
- add() : void
- Adds an event to the list when event listing is enabled.
- count() : int
- Count elements of an object
- flush() : void
- Empties the list of dispatched events.
- hasEvent() : bool
- Checks if an event is in the list.
- offsetExists() : bool
- Whether a offset exists
- offsetGet() : mixed
- Offset to retrieve
- offsetSet() : void
- Offset to set
- offsetUnset() : void
- Offset to unset
Properties
$_events
Events list
protected
array<string|int, EventInterface>
$_events
= []
Methods
add()
Adds an event to the list when event listing is enabled.
public
add(EventInterface $event) : void
Parameters
- $event : EventInterface
-
An event to the list of dispatched events.
count()
Count elements of an object
public
count() : int
Tags
Return values
int —The custom count as an integer.
flush()
Empties the list of dispatched events.
public
flush() : void
hasEvent()
Checks if an event is in the list.
public
hasEvent(string $name) : bool
Parameters
- $name : string
-
Event name.
Return values
booloffsetExists()
Whether a offset exists
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
-
An offset to check for.
Tags
Return values
bool —True on success or false on failure.
offsetGet()
Offset to retrieve
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
-
The offset to retrieve.
Tags
Attributes
- #[ReturnTypeWillChange]
Return values
mixed —Can return all value types.
offsetSet()
Offset to set
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
-
The offset to assign the value to.
- $value : mixed
-
The value to set.
Tags
offsetUnset()
Offset to unset
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
-
The offset to unset.