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

        $this->children[] = $node;
        $node->parent = $this;

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

        $this->children[] = $node;
        $node->parent = $this;

        return $this;
    }
public function append ( Node $ node ) { $ this -> children [ ] = $ node ; $ node -> parent = $ this ; return $ this ; }
Appends the given node to this node's children.

This also sets the parent of the given child to this node

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

[element:a]->append([element:d])

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

@param Node $node the new child node to be appended

@return $this
Appends the given node to this node s children .