コード例 #1
0
ファイル: StructTest.php プロジェクト: sgc-fireball/libphp
    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());
    }
コード例 #2
0
ファイル: SsdpResponse.php プロジェクト: sgc-fireball/libphp
 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'] : '';
 }
コード例 #3
0
ファイル: Timeout.php プロジェクト: sgc-fireball/libphp
 /**
  * @param array $data
  */
 public function __construct(array $data = [])
 {
     parent::__construct($data);
     $this->data['id'] = spl_object_hash($this);
 }