Ejemplo n.º 1
0
 protected function takeChildFromDOM($child)
 {
     $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
     switch ($absoluteNodeName) {
         case $this->lookupNamespace('gd') . ':' . 'attendeeStatus':
             $attendeeStatus = new Zend_Gdata_Extension_AttendeeStatus();
             $attendeeStatus->transferFromDOM($child);
             $this->_attendeeStatus = $attendeeStatus;
             break;
         case $this->lookupNamespace('gd') . ':' . 'attendeeType':
             $attendeeType = new Zend_Gdata_Extension_AttendeeType();
             $attendeeType->transferFromDOM($child);
             $this->_attendeeType = $attendeeType;
             break;
         case $this->lookupNamespace('gd') . ':' . 'entryLink':
             $entryLink = new Zend_Gdata_Extension_EntryLink();
             $entryLink->transferFromDOM($child);
             $this->_entryLink = $entryLink;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }
Ejemplo n.º 2
0
 public function testExtensionAttributes()
 {
     $extensionAttributes = $this->attendeeStatus->extensionAttributes;
     $extensionAttributes['foo1'] = array('name' => 'foo1', 'value' => 'bar');
     $extensionAttributes['foo2'] = array('name' => 'foo2', 'value' => 'rab');
     $this->attendeeStatus->extensionAttributes = $extensionAttributes;
     $this->assertEquals('bar', $this->attendeeStatus->extensionAttributes['foo1']['value']);
     $this->assertEquals('rab', $this->attendeeStatus->extensionAttributes['foo2']['value']);
     $attendeeStatusXml = $this->attendeeStatus->saveXML();
     $newAttendeeStatus = new Zend_Gdata_Extension_AttendeeStatus();
     $newAttendeeStatus->transferFromXML($attendeeStatusXml);
     $this->assertEquals('bar', $newAttendeeStatus->extensionAttributes['foo1']['value']);
     $this->assertEquals('rab', $newAttendeeStatus->extensionAttributes['foo2']['value']);
 }