class CRM_Utils_ICalendar

Methods

static string
formatText(string $text)

Escape text elements for safe ICalendar use.

static string
unformatText(string $text)

Restore iCal formatted text to normal.

static string
formatDate($date, bool $gdata = FALSE)

Escape date elements for safe ICalendar use.

static 
send(string $calendar, string $content_type = 'text/calendar', string $charset = 'us-ascii', string $fileName = NULL, string $disposition = NULL)

Send the ICalendar to the browser with the specified content type - 'text/calendar' : used for downloaded ics file - 'text/plain' : used for iCal formatted feed - 'text/xml' : used for gData or rss formatted feeds

Details

at line 50
static string formatText(string $text)

Escape text elements for safe ICalendar use.

Parameters

string $text Text to escape.

Return Value

string

at line 68
static string unformatText(string $text)

Restore iCal formatted text to normal.

Parameters

string $text Text to unescape.

Return Value

string

at line 88
static string formatDate($date, bool $gdata = FALSE)

Escape date elements for safe ICalendar use.

Parameters

$date Date to escape.
bool $gdata

Return Value

string Escaped date

at line 119
static send(string $calendar, string $content_type = 'text/calendar', string $charset = 'us-ascii', string $fileName = NULL, string $disposition = NULL)

Send the ICalendar to the browser with the specified content type - 'text/calendar' : used for downloaded ics file - 'text/plain' : used for iCal formatted feed - 'text/xml' : used for gData or rss formatted feeds

Parameters

string $calendar The calendar data to be published.
string $content_type
string $charset The character set to use, defaults to 'us-ascii'.
string $fileName The file name (for downloads).
string $disposition How the file should be sent ('attachment' for downloads).