Fork me on Github

Interface CalendR\Event\Collection\ CollectionInterface

Represents an event collection.


Implements: Countable

Methods

add( EventInterface $event)

Adds an event to the collection

remove( EventInterface $event)

Removes an event from the collection

array<EventInterface> all()

Return all events;

bool has( mixed $index)

Returns if there is events corresponding to $index period

array<EventInterface> find( mixed $index)

Find events in the collection

Details

public add( EventInterface $event)

Adds an event to the collection

Parameters
EventInterface $event

public remove( EventInterface $event)

Removes an event from the collection

Parameters
EventInterface $event

public array<EventInterface> all()

Return all events;

Return Value
array<EventInterface>

public bool has( mixed $index)

Returns if there is events corresponding to $index period

Parameters
mixed $index
Return Value
bool

public array<EventInterface> find( mixed $index)

Find events in the collection

Parameters
mixed $index
Return Value
array<EventInterface>