RootNode::setParent PHP Method

setParent() public method

public setParent ( RootNode $node )
$node RootNode
    public function setParent(RootNode $node)
    {
        $this->_parent = $node;
    }

Usage Example

Example #1
0
 public function addNode(RootNode $node = null)
 {
     if ($node === null) {
         return false;
     }
     $node->setParent($this);
     $this->_children[] = $node;
     ++$this->_childrenCount;
     return true;
 }