EventOccurrence
in package
implements
ArrayAccess
uses
ArrayAccessHelper
Represents a single occurrence of a calendar event.
Table of Contents
Interfaces
- ArrayAccess
Properties
- $adjustment : Time
- $id : string
- $id_event : int
- $start : Time
- $prop_aliases : array<string|int, mixed>
- $unadjusted_start : Time
Methods
- __construct() : EventOccurrence
- Constructor.
- __get() : mixed
- Gets custom property values.
- __isset() : bool
- Checks whether a custom property has been set.
- __set() : void
- Sets custom properties.
- export() : string
- Builds an iCalendar component for this occurrence of the event.
- fixTimezone() : void
- getParentEvent() : Event
- Retrieves the Event that this EventOccurrence is an occurrence of.
- modify() : void
- Modifies an individual occurrence of an event.
- offsetExists() : bool
- Checks whether a property has been set when object is accessed as an array.
- offsetGet() : mixed
- Gets properties when object is accessed as an array.
- offsetSet() : void
- Sets properties when object is accessed as an array.
- offsetUnset() : void
- Unsets properties when object is accessed as an array.
- remove() : void
- Removes an event occurrence from the recurrence set.
- save() : mixed
- Saving an individual occurrence means updating the parent event's adjustments property and then saving the parent event.
Properties
$adjustment
public
Time
$adjustment
An EventAdjustment object representing changes made to this occurrence of the event, if any.
$id
public
string
$id
The recurrence ID of this individual occurrence of the event.
See RFC 5545, section 3.8.4.4.
$id_event
public
int
$id_event
The ID number of the parent event.
All occurrences of an event have the same $id_event value.
$start
public
Time
$start
A Time object representing the start of this occurrence of the event.
$prop_aliases
protected
array<string|int, mixed>
$prop_aliases
= ['recurrenceid' => 'id', 'eventid' => 'id_event', 'id_board' => 'board', 'id_topic' => 'topic', 'id_first_msg' => 'msg', 'id_member' => 'member', 'poster' => 'member', 'real_name' => 'name', 'realname' => 'name', 'member_groups' => 'groups', 'allowed_groups' => 'groups', 'start_object' => 'start', 'end_object' => 'end']
Alternate names for some object properties.
$unadjusted_start
protected
Time
$unadjusted_start
A Time object representing the unadjusted start of this occurrence.
Methods
__construct()
Constructor.
public
__construct([int $id_event = 0 ][, array<string|int, mixed> $props = [] ]) : EventOccurrence
Parameters
- $id_event : int = 0
-
The ID number of the parent event.
- $props : array<string|int, mixed> = []
-
Properties to set for this occurrence.
Return values
EventOccurrence —An instance of this class.
__get()
Gets custom property values.
public
__get(string $prop) : mixed
Parameters
- $prop : string
-
The property name.
__isset()
Checks whether a custom property has been set.
public
__isset(string $prop) : bool
Parameters
- $prop : string
-
The property name.
Return values
bool__set()
Sets custom properties.
public
__set(string $prop, mixed $value) : void
Parameters
- $prop : string
-
The property name.
- $value : mixed
-
The value to set.
export()
Builds an iCalendar component for this occurrence of the event.
public
export() : string
Return values
string —A VEVENT component for an iCalendar document.
fixTimezone()
public
fixTimezone() : void
getParentEvent()
Retrieves the Event that this EventOccurrence is an occurrence of.
public
getParentEvent() : Event
Return values
Event —The parent Event.
modify()
Modifies an individual occurrence of an event.
public
static modify(int $id_event, string $id, array<string|int, mixed> &$eventOptions) : void
Parameters
- $id_event : int
-
The ID of the parent event.
- $id : string
-
The recurrence ID of the occurrence.
- $eventOptions : array<string|int, mixed>
-
An array of event information.
offsetExists()
Checks whether a property has been set when object is accessed as an array.
public
offsetExists(mixed $prop) : bool
Parameters
- $prop : mixed
-
The property name.
Return values
booloffsetGet()
Gets properties when object is accessed as an array.
public
& offsetGet(mixed $prop) : mixed
Parameters
- $prop : mixed
-
The property name.
Return values
mixed —A reference to the property.
offsetSet()
Sets properties when object is accessed as an array.
public
offsetSet(mixed $prop, mixed $value) : void
Parameters
- $prop : mixed
-
The property name.
- $value : mixed
-
The value to set.
offsetUnset()
Unsets properties when object is accessed as an array.
public
offsetUnset(mixed $prop) : void
Parameters
- $prop : mixed
-
The property name.
remove()
Removes an event occurrence from the recurrence set.
public
static remove(int $id_event, string $id[, bool $affects_future = false ]) : void
Parameters
- $id_event : int
-
The parent event's ID.
- $id : string
-
The recurrence ID.
- $affects_future : bool = false
save()
Saving an individual occurrence means updating the parent event's adjustments property and then saving the parent event.
public
save() : mixed