IP.Board  3.3.0
app_calendar_classes_icalendarOutput Class Reference

Public Member Functions

 __construct (ipsRegistry $registry, $calendarId)
 addEvent ($event)
 buildICalendarFeed ()
 getError ()
 getEvents ()
 import ($content, $member_id=0, $feed_id=0)
 removeEvent ($eventId)

Protected Member Functions

 _addEvents ()
 _addTimezones ()
 _buildIcalDate ($time, $dateOnly=false)
 _buildUid ($params)
 _convertToGmt ($data)
 _encodeSpecialCharacters ($text, $lineFold=true)
 _foldLines ($text)
 _getRecurrenceData ($data)
 _parseBeginBlock ($type, $start)
 _processEventObject ($start)
 _processTimezoneObject ($start)
 _processTimezoneTypeObject ($start, $type)
 _processVcalendarObject ($start)
 _unencodeSpecialCharacters ($text)
 _unfoldLines ($string, $line)
 _unparseContent ($string, $line)
 _unparseTimeInfo ($string)

Protected Attributes

 $_begin = ''
 $_error = ''
 $_events = array()
 $_feedEarliest = 0
 $_feedLatest = 0
 $_parsedIcsData = array()
 $_rawIcsData = array()
 $_tzBegin = ''
 $_tzId = ''
 $cache
 $caches
 $calendar = array()
 $DB
 $functions
 $lang
 $member
 $memberData
 $registry
 $request
 $settings

Constructor & Destructor Documentation

__construct ( ipsRegistry registry,
calendarId 
)

Constructor

Parameters:
objectRegistry object
intCalendar we want to output
Returns:
void

Member Function Documentation

_addEvents ( ) [protected]

Build the VEVENT parts of the iCalendar feed

Returns:
string
_addTimezones ( ) [protected]

Build the VTIMEZONE parts of the iCalendar feed

Returns:
string
_buildIcalDate ( time,
dateOnly = false 
) [protected]

Return a date in iCalendar format

Parameters:
intTimestamp
boolBuild date only format
stringDate in format of YYYYMMDDTHHMMSSZ OR YYYYMMDD
_buildUid ( params) [protected]

Return a UID for iCalendar

Parameters:
arrayParameters to use to generate UID
stringUID
_convertToGmt ( data) [protected]

Convert times to GMT based on timezones

Parameters:
array$dataParsed data
Returns:
array
_encodeSpecialCharacters ( text,
lineFold = true 
) [protected]

Encode special characters in a string for iCalendar

Parameters:
stringString to encode
boolLine-fold
stringEncoded string
_foldLines ( text) [protected]

Fold lines per RFC2445

Parameters:
string$textString to fold
Returns:
string
See Also:
https://gist.github.com/81747
_getRecurrenceData ( data) [protected]

Get event recurrence data

Parameters:
stringData
Returns:
array
_parseBeginBlock ( type,
start 
) [protected]

Parse a 'BEGIN:' block in an iCalendar feed

Parameters:
string$typeType of 'BEGIN' object
int$startLine number
Returns:
void
_processEventObject ( start) [protected]

Parse event object in an ical feed

Parameters:
int$startLine number
Returns:
void
_processTimezoneObject ( start) [protected]

Parse a timezone object in an ical feed

Parameters:
int$startLine number
Returns:
void
_processTimezoneTypeObject ( start,
type 
) [protected]

Parse a timezone object in an ical feed

Parameters:
int$startLine number
string$typeType of time zone object to parse
Returns:
void
_processVcalendarObject ( start) [protected]

Parse core vcalendar object in an ical feed

Parameters:
int$startLine number
Returns:
void
_unencodeSpecialCharacters ( text) [protected]

Un-encode special characters in a string coming from iCalendar feed

Parameters:
stringString to unencode
stringEncoded string
See Also:
http://community.invisionpower.com/tracker/issue-33787-formatting-problem-with-imported-ics-file-calendar-app/
_unfoldLines ( string,
line 
) [protected]

Unfold lines per RFC2445 4.1

Parameters:
string$stringStarting string
int$lineStarting line number
string
_unparseContent ( string,
line 
) [protected]

Unformat content from incoming ical feed

Parameters:
string$stringString content to unparse
int$lineLine number
Returns:
mixed Array of data, or false
_unparseTimeInfo ( string) [protected]

Unparse time information from iCalendar datetime info

Parameters:
string$stringiCalendar line
Returns:
array Time information
addEvent ( event)

Add an event

Parameters:
arrayEvent data
Returns:
void

Build iCalendar feed and return

Returns:
string iCalendar feed (can be downloaded or sent as webcal subscription)
getError ( )

Retrieve stored error message

Returns:
string
getEvents ( )

Return events to be output

Returns:
void
import ( content,
member_id = 0,
feed_id = 0 
)

Import and parse an iCalendar feed

Parameters:
string$contentFeed content
int$member_idMember to save events under
int$feed_idFeed id
Returns:
mixed False on failure, otherwise an array with keys 'skipped' and 'imported'
removeEvent ( eventId)

Remove an event

Parameters:
intEvent id
Returns:
void

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables