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

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

Visit all the child nodes and collect them by removing.
protected collectChildren ( $parent, &$nodes )
    protected function collectChildren($parent, &$nodes)
    {
        $noChildren = !$this->hasChildren($nodes);
        $childs = array();
        for (reset($nodes); $key = key($nodes);) {
            next($nodes);
            if ($noChildren) {
                $childs[] = $key;
                unset($nodes[$key]);
            } else {
                $this->collectChildren($key, $nodes[$key]);
            }
        }
        if (count($childs) > 0) {
            $this->onChildNodesVisited($parent, $childs);
        }
    }