Exemple #1
0
 /**
  * Add child to this node
  *
  * If the child already has a parent, the link is unset
  *
  * @param   Tree_Node  $child  The child to be added
  *
  * @return  void
  */
 public function add_child(Tree_Node $child)
 {
     if ($child instanceof Tree_Node) {
         $child->set_parent($this);
     }
     return $this;
 }