Example #1
0
 /**
  * setParent() test
  */
 public function testSetParent()
 {
     $parent = new Zend_Server_Reflection_Node('string');
     $child = new Zend_Server_Reflection_Node('array');
     $child->setParent($parent);
     $this->assertTrue($parent === $child->getParent());
 }
Example #2
0
 /**
  * Attach a child node
  *
  * @param Zend_Server_Reflection_Node $node
  * @return void
  */
 public function attachChild(Zend_Server_Reflection_Node $node)
 {
     $this->_children[] = $node;
     if ($node->getParent() !== $this) {
         $node->setParent($this);
     }
 }