Esempio n. 1
0
 public static function decode(Vpdi_Property $FREEBUSY) {
   $fbs = array();
   $periods = Vpdi::decodeTextList($FREEBUSY->value());
   foreach ($periods as $p) {
     list($start, $end) = Vpdi::decodePeriod($p);
     $fbs[] = new Vpdi_Icalendar_Freebusy($start, $end);
   }
   if (count($fbs) == 1) return $fbs[0];
   return $fbs;
 }
Esempio n. 2
0
 public static function decode(Vpdi_Property $IMPP) {
   $im = new Vpdi_Vcard_Impp($IMPP->value());
   $im->addTypes($IMPP->getParam('TYPE'));
   return $im;
 }
Esempio n. 3
0
 public static function decode(Vpdi_Property $ORGANIZER) {
   $org = new Vpdi_Icalendar_Organizer($ORGANIZER->value());
   $org->decodeParameters($ORGANIZER);
   return $org;
 }
Esempio n. 4
0
 /**
  * Returns the value for a property
  * 
  * @param Vpdi_Property $property
  * @access private
  * @return mixed
  */
 protected function decodeProperty($property) {
   return Vpdi::decodeText($property->value());
 }
Esempio n. 5
0
 public static function decode(Vpdi_Property $ADR) {
   $parts = Vpdi::decodeTextList($ADR->value(), ';');
   $add = new Vpdi_Vcard_Address;
   foreach (self::$addr_parts as $i => $part) {
     $add->{$part} = (isset($parts[$i])) ? $parts[$i] : '';
   }
   $add->addTypes($ADR->getParam('TYPE'));
   return $add;
 }
Esempio n. 6
0
 public static function decode(Vpdi_Property $EMAIL) {
   $em = new Vpdi_Vcard_Email($EMAIL->value());
   $em->addTypes($EMAIL->getParam('TYPE'));
   return $em;
 }
Esempio n. 7
0
 public static function decode(Vpdi_Property $ATTENDEE) {
   $org = new Vpdi_Icalendar_Attendee($ATTENDEE->value());
   $org->decodeParameters($ATTENDEE);
   return $org;
 }