Example #1
0
 /**
  * This method adds a new child node to this node instance.
  *
  * @param PHP_Depend_Code_ASTNodeI $node The new child node.
  *
  * @return void
  */
 public function addChild(PHP_Depend_Code_ASTNodeI $node)
 {
     // Store child node
     $this->nodes[] = $node;
     // Set this as parent
     $node->setParent($this);
 }
Example #2
0
 /**
  * This method adds a new child node to this node instance.
  *
  * @param PHP_Depend_Code_ASTNodeI $node The new child node.
  *
  * @return void
  */
 public function addChild(PHP_Depend_Code_ASTNodeI $node)
 {
     $this->nodes[] = $node;
     $node->setParent($this);
 }