コード例 #1
0
ファイル: Writer.php プロジェクト: talesoft/tale-framework
 public function writeLeaf(Leaf $leaf, $level = null)
 {
     $newLine = $this->isPretty() ? $this->getNewLine() : '';
     $str = '';
     if ($leaf instanceof Document) {
         $str .= "<!DOCTYPE " . $leaf->getDocumentType() . ">" . $newLine;
     }
     return $str . parent::writeLeaf($leaf);
 }
コード例 #2
0
ファイル: Node.php プロジェクト: talesoft/tale-framework
 public function __clone()
 {
     parent::__clone();
     foreach ($this->_children as $i => $child) {
         $this->appendChild(clone $child);
     }
 }