Example #1
0
 /**
  * Remove child node
  *
  * @param \Includes\DataStructure\Graph $node Node to remove
  *
  * @return void
  */
 public function removeChild(\Includes\DataStructure\Graph $node)
 {
     foreach ($this->getChildren() as $index => $child) {
         if ($node->getKey() === $child->getKey()) {
             $node->setParent(null);
         }
     }
     parent::removeChild($node);
 }