function exportvCalendar() { foreach ($this->_busyPeriods as $start => $end) { $periods = array(array('start' => $start, 'end' => $end)); $this->setAttribute('FREEBUSY', $periods); } $res = parent::_exportvData('VFREEBUSY'); foreach ($this->_attributes as $key => $attribute) { if ($attribute['name'] == 'FREEBUSY') { unset($this->_attributes[$key]); } } return $res; }
function exportvCalendar() { // Default values. $requiredAttributes = array(); $requiredAttributes['DTSTAMP'] = time(); $requiredAttributes['ORGANIZER'] = 'Unknown Organizer'; $requiredAttributes['UID'] = $this->_exportDateTime(time()) . '@' . (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost'); $method = !empty($this->_container) ? $this->_container->getAttribute('METHOD') : 'PUBLISH'; switch ($method) { case 'PUBLISH': $requiredAttributes['DTSTART'] = time(); $requiredAttributes['SUMMARY'] = ''; break; case 'REQUEST': $requiredAttributes['ATTENDEE'] = ''; $requiredAttributes['DTSTART'] = time(); $requiredAttributes['SUMMARY'] = ''; break; case 'REPLY': $requiredAttributes['ATTENDEE'] = ''; break; case 'ADD': $requiredAttributes['DTSTART'] = time(); $requiredAttributes['SEQUENCE'] = 1; $requiredAttributes['SUMMARY'] = ''; break; case 'CANCEL': $requiredAttributes['ATTENDEE'] = ''; $requiredAttributes['SEQUENCE'] = 1; break; case 'REFRESH': $requiredAttributes['ATTENDEE'] = ''; break; } foreach ($requiredAttributes as $name => $default_value) { if (is_a($this->getAttribute($name), 'PEAR_Error')) { $this->setAttribute($name, $default_value); } } return parent::_exportvData('VEVENT'); }
function parsevCalendar($data) { return parent::parsevCalendar($data, 'VNOTE'); }
function exportvCalendar() { return parent::_exportvData('VTODO'); }
function parsevCalendar($data) { return parent::parsevCalendar($data, 'vcard'); }
function exportvCalendar() { return parent::_exportvData('VALARM'); }
function exportvCalendar() { return parent::_exportvData('VTIMEZONE'); }
function exportvCalendar() { return parent::_exportvData('VJOURNAL'); }
function exportvCalendar() { return parent::_exportvData('STANDARD'); }
function exportvCalendar() { return parent::_exportvData('DAYLIGHT'); }