Exemple #1
0
 protected function takeChildFromDOM($child)
 {
     $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
     switch ($absoluteNodeName) {
         case $this->lookupNamespace('gd') . ':' . 'reminder':
             $reminder = new Reminder();
             $reminder->transferFromDOM($child);
             $this->_reminders[] = $reminder;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }
Exemple #2
0
 public function testExtensionAttributes()
 {
     $extensionAttributes = $this->reminder->extensionAttributes;
     $extensionAttributes['foo1'] = array('name' => 'foo1', 'value' => 'bar');
     $extensionAttributes['foo2'] = array('name' => 'foo2', 'value' => 'rab');
     $this->reminder->extensionAttributes = $extensionAttributes;
     $this->assertEquals('bar', $this->reminder->extensionAttributes['foo1']['value']);
     $this->assertEquals('rab', $this->reminder->extensionAttributes['foo2']['value']);
     $reminderXml = $this->reminder->saveXML();
     $newReminder = new Extension\Reminder();
     $newReminder->transferFromXML($reminderXml);
     $this->assertEquals('bar', $newReminder->extensionAttributes['foo1']['value']);
     $this->assertEquals('rab', $newReminder->extensionAttributes['foo2']['value']);
 }