Exemple #1
0
 /**
  *
  */
 public function __clone()
 {
     parent::__clone();
     $children = $this->children;
     $this->children = [];
     foreach ($children as $child) {
         $this->appendChild(clone $child);
     }
 }
Exemple #2
0
 /**
  * Text constructor.
  *
  * @param string $text
  * @param NodeInterface $parent
  */
 public function __construct($text, NodeInterface $parent = null)
 {
     parent::__construct($parent);
     $this->text = $text;
 }