Example #1
0
 public function testExtensionAttributes() {
     $extensionAttributes = $this->attendeeType->extensionAttributes;
     $extensionAttributes['foo1'] = array('name'=>'foo1', 'value'=>'bar');
     $extensionAttributes['foo2'] = array('name'=>'foo2', 'value'=>'rab');
     $this->attendeeType->extensionAttributes = $extensionAttributes;
     $this->assertEquals('bar', $this->attendeeType->extensionAttributes['foo1']['value']);
     $this->assertEquals('rab', $this->attendeeType->extensionAttributes['foo2']['value']);
     $attendeeTypeXml = $this->attendeeType->saveXML();
     $newAttendeeType = new Extension\AttendeeType();
     $newAttendeeType->transferFromXML($attendeeTypeXml);
     $this->assertEquals('bar', $newAttendeeType->extensionAttributes['foo1']['value']);
     $this->assertEquals('rab', $newAttendeeType->extensionAttributes['foo2']['value']);
 }
Example #2
0
 /**
  * Creates individual Entry objects of the appropriate type and
  * stores them as members of this entry based upon DOM data.
  *
  * @param DOMNode $child The DOMNode to process
  */
 protected function takeChildFromDOM($child)
 {
     $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
     switch ($absoluteNodeName) {
         case $this->lookupNamespace('gd') . ':' . 'attendeeStatus':
             $attendeeStatus = new AttendeeStatus();
             $attendeeStatus->transferFromDOM($child);
             $this->_attendeeStatus = $attendeeStatus;
             break;
         case $this->lookupNamespace('gd') . ':' . 'attendeeType':
             $attendeeType = new AttendeeType();
             $attendeeType->transferFromDOM($child);
             $this->_attendeeType = $attendeeType;
             break;
         case $this->lookupNamespace('gd') . ':' . 'entryLink':
             $entryLink = new EntryLink();
             $entryLink->transferFromDOM($child);
             $this->_entryLink = $entryLink;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }