Ejemplo n.º 1
0
 protected function takeChildFromDOM($child)
 {
     $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
     switch ($absoluteNodeName) {
         case $this->lookupNamespace('gCal') . ':' . 'sendEventNotifications':
             $sendEventNotifications = new Extension\SendEventNotifications();
             $sendEventNotifications->transferFromDOM($child);
             $this->_sendEventNotifications = $sendEventNotifications;
             break;
         case $this->lookupNamespace('gCal') . ':' . 'timezone':
             $timezone = new Extension\Timezone();
             $timezone->transferFromDOM($child);
             $this->_timezone = $timezone;
             break;
         case $this->lookupNamespace('atom') . ':' . 'link':
             $link = new Extension\Link();
             $link->transferFromDOM($child);
             $this->_link[] = $link;
             break;
         case $this->lookupNamespace('gCal') . ':' . 'quickadd':
             $quickadd = new Extension\QuickAdd();
             $quickadd->transferFromDOM($child);
             $this->_quickadd = $quickadd;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }
Ejemplo n.º 2
0
 protected function takeChildFromDOM($child)
 {
     $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
     switch ($absoluteNodeName) {
         case $this->lookupNamespace('gCal') . ':' . 'timezone':
             $timezone = new Extension\Timezone();
             $timezone->transferFromDOM($child);
             $this->_timezone = $timezone;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }
Ejemplo n.º 3
0
 protected function takeChildFromDOM($child)
 {
     $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
     switch ($absoluteNodeName) {
         case $this->lookupNamespace('gCal') . ':' . 'accesslevel':
             $accessLevel = new Extension\AccessLevel();
             $accessLevel->transferFromDOM($child);
             $this->_accessLevel = $accessLevel;
             break;
         case $this->lookupNamespace('gCal') . ':' . 'color':
             $color = new Extension\Color();
             $color->transferFromDOM($child);
             $this->_color = $color;
             break;
         case $this->lookupNamespace('gCal') . ':' . 'hidden':
             $hidden = new Extension\Hidden();
             $hidden->transferFromDOM($child);
             $this->_hidden = $hidden;
             break;
         case $this->lookupNamespace('gCal') . ':' . 'selected':
             $selected = new Extension\Selected();
             $selected->transferFromDOM($child);
             $this->_selected = $selected;
             break;
         case $this->lookupNamespace('gCal') . ':' . 'timezone':
             $timezone = new Extension\Timezone();
             $timezone->transferFromDOM($child);
             $this->_timezone = $timezone;
             break;
         case $this->lookupNamespace('gd') . ':' . 'where':
             $where = new \ZendGData\Extension\Where();
             $where->transferFromDOM($child);
             $this->_where[] = $where;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }
Ejemplo n.º 4
0
 public function testExtensionAttributes()
 {
     $extensionAttributes = $this->timezone->extensionAttributes;
     $extensionAttributes['foo1'] = array('name' => 'foo1', 'value' => 'bar');
     $extensionAttributes['foo2'] = array('name' => 'foo2', 'value' => 'rab');
     $this->timezone->extensionAttributes = $extensionAttributes;
     $this->assertEquals('bar', $this->timezone->extensionAttributes['foo1']['value']);
     $this->assertEquals('rab', $this->timezone->extensionAttributes['foo2']['value']);
     $timezoneXml = $this->timezone->saveXML();
     $newTimezone = new Extension\Timezone();
     $newTimezone->transferFromXML($timezoneXml);
     $this->assertEquals('bar', $newTimezone->extensionAttributes['foo1']['value']);
     $this->assertEquals('rab', $newTimezone->extensionAttributes['foo2']['value']);
 }