\ZCiCal

The main iCalendar object containing ZCiCalDataNodes and ZCiCalNodes.

Summary

Methods
Properties
Constants
__construct()
countEvents()
countVenues()
export()
getFirstEvent()
getNextEvent()
getFirstVenue()
getNextVenue()
getFirstChild()
getNextSibling()
getPrevSibling()
toUnixDateTime()
fromUnixDateTime()
fromUnixDate()
fromSqlDateTime()
toSqlDateTime()
getTZValues()
formatContent()
$tree
$curnode
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$tree

$tree : object

The root node of the object tree

Type

object

$curnode

$curnode : object

The most recently created node in the tree

Type

object

Methods

__construct()

__construct(string  $data = "", integer  $maxevents = 1000000, integer  $startevent) : void

The main iCalendar object containing ZCiCalDataNodes and ZCiCalNodes.

use maxevents and startevent to read events in multiple passes (to save memory)

Parameters

string $data

icalendar feed string (empty if creating new feed)

integer $maxevents

maximum # of events to read

integer $startevent

starting event to read

countEvents()

countEvents() : integer

CountEvents()

Return the # of VEVENTs in the object

Returns

integer

countVenues()

countVenues() : integer

CountVenues()

Return the # of VVENUEs in the object

Returns

integer

export()

export() : string

Export object to string

This function exports all objects to an iCalendar string

Returns

string —

an iCalendar formatted string

getFirstEvent()

getFirstEvent() : object

Get first event in object list Use getNextEvent() to navigate through list

Returns

object —

The first event, or null

getNextEvent()

getNextEvent(object  $event) : object

Get next event in object list

Parameters

object $event

The current event object

Returns

object —

Returns the next event or null if past last event

getFirstVenue()

getFirstVenue() : object

Get first venue in object list Use getNextVenue() to navigate through list

Returns

object —

The first venue, or null

getNextVenue()

getNextVenue(object  $venue) : object

Get next venue in object list

Parameters

object $venue

The current venue object

Returns

object —

Returns the next venue or null if past last venue

getFirstChild()

getFirstChild(object  $thisnode) : object

Get first child in object list Use getNextSibling() and getPreviousSibling() to navigate through list

Parameters

object $thisnode

The parent object

Returns

object —

The child object

getNextSibling()

getNextSibling(object  $thisnode) : object

Get next sibling in object list

Parameters

object $thisnode

The current object

Returns

object —

Returns the next sibling

getPrevSibling()

getPrevSibling(object  $thisnode) : object

Get previous sibling in object list

Parameters

object $thisnode

The current object

Returns

object —

Returns the previous sibling

toUnixDateTime()

toUnixDateTime(  $datetime) : integer

Read date/time in iCal formatted string

Parameters

$datetime

Returns

integer —

Unix timestamp

fromUnixDateTime()

fromUnixDateTime(integer  $datetime = null) : string

fromUnixDateTime()

Take Unix timestamp and format to iCal date/time string

Parameters

integer $datetime

Unix timestamp, leave blank for current date/time

Returns

string —

formatted iCal date/time string

fromUnixDate()

fromUnixDate(integer  $datetime = null) : string

fromUnixDate()

Take Unix timestamp and format to iCal date string

Parameters

integer $datetime

Unix timestamp, leave blank for current date/time

Returns

string —

formatted iCal date string

fromSqlDateTime()

fromSqlDateTime(string  $datetime = "") : string

Format into iCal time format from SQL date or SQL date-time format

Parameters

string $datetime

SQL date or SQL date-time string

Returns

string —

iCal formatted string

toSqlDateTime()

toSqlDateTime(string  $datetime = "") : string

Format iCal time format to either SQL date or SQL date-time format

Parameters

string $datetime

icalendar formatted date or date-time

Returns

string —

SQL date or SQL date-time string

getTZValues()

getTZValues(array  $node) : array

Pull timezone data from node and put in array

Returning array contains the following array keys: tzoffsetfrom, tzoffsetto, tzname, dtstart, rrule

Parameters

array $node

timezone object

Returns

array

formatContent()

formatContent(string  $content) : string

Escape slashes, commas and semicolons in strings

Parameters

string $content

Returns

string