Prado\Data\SqlMap\Statements\TSqlMapObjectCollectionTree::addNode PHP Метод

addNode() защищенный Метод

Find the parent node and add the new node as its child.
protected addNode ( &$childs, $parent, $node ) : boolean
Результат boolean true if parent node is found.
    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;
    }