setParent() public méthode

Sets the parent node of this node.
public setParent ( PDepend\Source\AST\ASTNode $node ) : void
$node PDepend\Source\AST\ASTNode
Résultat void
 /**
  * This method adds a new child node to this node instance.
  *
  * @param \PDepend\Source\AST\ASTNode $node The new child node.
  *
  * @return void
  */
 public function addChild(\PDepend\Source\AST\ASTNode $node)
 {
     $this->nodes[] = $node;
     $node->setParent($this);
 }