Parser/Node.php
public function remove(Node $node)
    {

        $index = $this->indexOf($node);

        if ($index !== false) {

            $this->children[$index]->parent = null;
            array_splice($this->children, $index, 1);
        }

        return $this;
    }
public function remove(Node $node)
    {

        $index = $this->indexOf($node);

        if ($index !== false) {

            $this->children[$index]->parent = null;
            array_splice($this->children, $index, 1);
        }

        return $this;
    }
public function remove ( Node $ node ) { $ index = $ this -> indexOf ( $ node ) ; if ( $ index !== false ) { $ this -> children [ $ index ] -> parent = null ; array_splice ( $ this -> children , $ index , 1 ) ; } return $ this ; }
Removes the given child node from this node's children.

The parent of the given child node will be set to null

[element:a]
(0)[element:b]
(1)[element:c]
(2)[element:d]

[element:a]->remove([element:c])

[element:a]
(0)[element:b]
(1)[element:d]

@param Node $node the node to remove from this node's children

@return $this
Removes the given child node from this node s children .