Exemplo n.º 1
0
 /**
  * @param Node $child
  */
 public function prependChild(Node $child)
 {
     if ($this->firstChild) {
         $this->firstChild->insertBefore($child);
     } else {
         $child->detach();
         $child->setParent($this);
         $this->lastChild = $this->firstChild = $child;
     }
 }