Fork me on Github

Interface CalendR\Event\ EventInterface

Base interface for events implementation

Methods

getUid()

Returns an unique identifier for the Event.

getBegin()

Returns the event begin

getEnd()

Returns the event end

bool contains( DateTime $datetime)

Check if the given date is during the event

bool containsPeriod( PeriodInterface $period)

Check if the given period is during the event

bool isDuring( PeriodInterface $period)

Check if the event is during the given period

Details

public getUid()

Returns an unique identifier for the Event.

Could be any string, but MUST to be unique. ex : ‘event-8’, ‘meeting-43’

public getBegin()

Returns the event begin

public getEnd()

Returns the event end

public bool contains( DateTime $datetime)

Check if the given date is during the event

Parameters
DateTime $datetime
Return Value
bool true if $datetime is during the event, false otherwise

public bool containsPeriod( PeriodInterface $period)

Check if the given period is during the event

Parameters
PeriodInterface $period
Return Value
bool true if $period is during the event, false otherwise

public bool isDuring( PeriodInterface $period)

Check if the event is during the given period

Parameters
PeriodInterface $period
Return Value
bool true if the event is during $period, false otherwise