/** * Syncs the data structures from XML structure */ public function syncDataStructures() { foreach ($this->__rootNode->attributes as $attribute) { $this->__descriptorAttributes->setParameter($attribute->name, $attribute->value); } if (is_array($tmp = $this->queryToArray('//resourceDescriptor/resourceProperty', 'name'))) { $this->__resourceProperties->setParameters($tmp); } if ($this->getElementsByTagName('label')->length) { $this->__label = trim($this->getElementsByTagName('label')->item(0)->nodeValue); } if ($this->getElementsByTagName('creationDate')->length) { $this->__crdate = trim($this->getElementsByTagName('creationDate')->item(0)->nodeValue); } }
public function testGetSetStringInteger() { $p = new AgaviParameterHolder(); $p->setParameter('10', 'ten'); $this->assertEquals('ten', $p->getParameter(10)); $p->setParameter(21, 'twentyone'); $this->assertEquals('twentyone', $p->getParameter('21')); $p->setParameters(array(1 => 'one')); $this->assertEquals('one', $p->getParameter('1')); $this->assertEquals(array(1 => 'one', 10 => 'ten', 21 => 'twentyone'), $p->getParameters()); }