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

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

Set the object properties for all the child nodes visited.
protected onChildNodesVisited ( $parent, $nodes )
    protected function onChildNodesVisited($parent, $nodes)
    {
        if (empty($parent) || empty($this->_entries[$parent])) {
            return;
        }
        $parentObject = $this->_entries[$parent]['object'];
        $property = $this->_entries[$nodes[0]]['property'];
        $list = TPropertyAccess::get($parentObject, $property);
        foreach ($nodes as $node) {
            if ($list instanceof TList) {
                $parentObject->{$property}[] = $this->_entries[$node]['object'];
            } else {
                if (is_array($list)) {
                    $list[] = $this->_entries[$node]['object'];
                } else {
                    throw new TSqlMapExecutionException('sqlmap_property_must_be_list');
                }
            }
        }
        if (is_array($list)) {
            TPropertyAccess::set($parentObject, $property, $list);
        }
        if ($this->_entries[$parent]['property'] === null) {
            $this->_list[] = $parentObject;
        }
    }