This class store event by indexing them with a given index pattern.
Index pattern is generated by an index function.
Implements:
CollectionInterface
| __construct( array $events = array(), callable| null $callable = null) | ||
|
add( EventInterface $event)
Adds an event to the collection |
||
|
remove( EventInterface $event)
Removes an event from the collection |
||
| bool |
has( mixed $index)
Returns if we have events for the given index |
|
| array<EventInterface> |
find( mixed $index)
returns events |
|
| array<EventInterface> |
all()
Returns a flattened array of all events |
|
| count() |
public
__construct( array $events = array(), callable| null $callable = null)
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
public
add( EventInterface $event)
public
remove( EventInterface $event)
public bool
has( mixed $index)
Returns if we have events for the given index
| Parameters |
|
|||
|---|---|---|---|---|
| Return Value |
|
|||
public array<EventInterface>
find( mixed $index)
returns events
| Parameters |
|
|||
|---|---|---|---|---|
| Return Value |
|
|||
public array<EventInterface>
all()
Returns a flattened array of all events
| Return Value |
|
|---|
public
count()