protected function prependChild(Node $node) {
    if ($this->head === NULL) {
      $this->childCount++;
      $node->parent = $this;
      $node->previous = NULL;
      $node->next = NULL;
      $this->head = $this->tail = $node;
    }
    else {
      $this->insertBeforeChild($this->head, $node);
      $this->head = $node;
    }
    return $this;
  }
protected function prependChild(Node $node) {
    if ($this->head === NULL) {
      $this->childCount++;
      $node->parent = $this;
      $node->previous = NULL;
      $node->next = NULL;
      $this->head = $this->tail = $node;
    }
    else {
      $this->insertBeforeChild($this->head, $node);
      $this->head = $node;
    }
    return $this;
  }
protected function prependChild ( Node $ node ) { if ( $ this -> head === NULL ) { $ this -> childCount ++ ; $ node -> parent = $ this ; $ node -> previous = NULL ; $ node -> next = NULL ; $ this -> head = $ this -> tail = $ node ; } else { $ this -> insertBeforeChild ( $ this -> head , $ node ) ; $ this -> head = $ node ; } return $ this ; }
Prepend a child to node.
@param Node $node
@return $this
Prepend a child to node .