Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 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');
 }
Ejemplo n.º 3
0
 function exportvCalendar()
 {
     return parent::_exportvData('VTODO');
 }
Ejemplo n.º 4
0
 function exportvCalendar()
 {
     return parent::_exportvData('VALARM');
 }
Ejemplo n.º 5
0
 function exportvCalendar()
 {
     return parent::_exportvData('VTIMEZONE');
 }
Ejemplo n.º 6
0
 function exportvCalendar()
 {
     return parent::_exportvData('VJOURNAL');
 }
Ejemplo n.º 7
0
 function exportvCalendar()
 {
     return parent::_exportvData('STANDARD');
 }
Ejemplo n.º 8
0
 function exportvCalendar()
 {
     return parent::_exportvData('DAYLIGHT');
 }