Fork me on Github

Class CalendR\Event\ Event

Concrete implementation of AbstractEvent and in fact EventInterface.

In most case, you’d better to implement your own events


Inherits from: AbstractEvent

Methods

bool contains( DateTime $datetime)

Check if the given date is during the event

from AbstractEvent
bool containsPeriod( PeriodInterface $period)

Check if the given period is during the event

from AbstractEvent
bool isDuring( PeriodInterface $period)

Check if the event is during the given period

from AbstractEvent
__construct($uid, DateTime $start, DateTime $end)

string getUid()

Returns an unique identifier for the Event.

DateTime getBegin()

Returns the event begin

DateTime getEnd()

Returns the event end

Details

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

public __construct($uid, DateTime $start, DateTime $end)

Parameters
$uid
DateTime $start
DateTime $end

public string getUid()

Returns an unique identifier for the Event.

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

Return Value
string an unique event identifier

public DateTime getBegin()

Returns the event begin

Return Value
DateTime event begin

public DateTime getEnd()

Returns the event end

Return Value
DateTime event end