public function testStructInStruct() { $structA = new Struct(array('testa' => new Struct(array('testb' => 'testB')))); $this->assertEquals('<?xml version="1.0" encoding="UTF-8" ?> <struct type="object" class="HRDNS\\Types\\Struct"> <testa type="object" class="HRDNS\\Types\\Struct"> <testb type="string"><![CDATA[testB]]></testb> </testa> </struct> ', $structA->getXML()); }
public function __construct(array $data = []) { parent::__construct($data); $this->data['httpversion'] = '1.0'; $this->data['httpcode'] = '200'; $this->data['httpstatus'] = 'OK'; $this->data['location'] = isset($this->data['location']) ? $this->data['location'] : ''; $this->data['server'] = isset($this->data['server']) ? $this->data['server'] : ''; $this->data['usn'] = isset($this->data['usn']) ? $this->data['usn'] : ''; }
/** * @param array $data */ public function __construct(array $data = []) { parent::__construct($data); $this->data['id'] = spl_object_hash($this); }