protected function addNode(&$childs, $parent, $node)
{
$found = false;
reset($childs);
for ($i = 0, $k = count($childs); $i < $k; $i++) {
$key = key($childs);
next($childs);
if ($key == $parent) {
$found = true;
$childs[$key][$node] = array();
} else {
$found = $found || $this->addNode($childs[$key], $parent, $node);
}
}
return $found;
}