private function updateTreeNatively($nodeUid, $classname, $leftnode = 1, $level = 0)
    {
        $node = new \StdClass();
        $node->uid = $nodeUid;
        $node->leftnode = $leftnode;
        $node->rightnode = $leftnode + 1;
        $node->level = $level;

        $start = 0;
        $numChildren = $this->getCountChildren($nodeUid, $classname);
        while ($start < $numChildren) {
            foreach ($children = $this->getNodeChildren($nodeUid, $classname, $start, $this->step) as $child_uid) {
                $child = $this->updateTreeNatively($child_uid, $classname, $leftnode + 1, $level + 1);
                $node->rightnode = $child->rightnode + 1;
                $leftnode = $child->rightnode;
                unset($child);
            }
            unset($children);
            $start += $this->step;
        }

        $this->updatePageNodes($node->uid, $node->leftnode, $node->rightnode, $node->level, $classname);

        return $node;
    }
private function updateTreeNatively($nodeUid, $classname, $leftnode = 1, $level = 0)
    {
        $node = new \StdClass();
        $node->uid = $nodeUid;
        $node->leftnode = $leftnode;
        $node->rightnode = $leftnode + 1;
        $node->level = $level;

        $start = 0;
        $numChildren = $this->getCountChildren($nodeUid, $classname);
        while ($start < $numChildren) {
            foreach ($children = $this->getNodeChildren($nodeUid, $classname, $start, $this->step) as $child_uid) {
                $child = $this->updateTreeNatively($child_uid, $classname, $leftnode + 1, $level + 1);
                $node->rightnode = $child->rightnode + 1;
                $leftnode = $child->rightnode;
                unset($child);
            }
            unset($children);
            $start += $this->step;
        }

        $this->updatePageNodes($node->uid, $node->leftnode, $node->rightnode, $node->level, $classname);

        return $node;
    }
private function updateTreeNatively ( $ nodeUid , $ classname , $ leftnode = 1 , $ level = 0 ) { $ node = new \ StdClass ( ) ; $ node -> uid = $ nodeUid ; $ node -> leftnode = $ leftnode ; $ node -> rightnode = $ leftnode + 1 ; $ node -> level = $ level ; $ start = 0 ; $ numChildren = $ this -> getCountChildren ( $ nodeUid , $ classname ) ; while ( $ start < $ numChildren ) { foreach ( $ children = $ this -> getNodeChildren ( $ nodeUid , $ classname , $ start , $ this -> step ) as $ child_uid ) { $ child = $ this -> updateTreeNatively ( $ child_uid , $ classname , $ leftnode + 1 , $ level + 1 ) ; $ node -> rightnode = $ child -> rightnode + 1 ; $ leftnode = $ child -> rightnode ; unset ( $ child ) ; } unset ( $ children ) ; $ start += $ this -> step ; } $ this -> updatePageNodes ( $ node -> uid , $ node -> leftnode , $ node -> rightnode , $ node -> level , $ classname ) ; return $ node ; }
Updates nodes information of a tree

@param  string   $nodeUid        The starting point in the tree
@param  string   $classname
@param  int      $leftnode       Optional, the first value of left node
@param  int      $level          Optional, the first value of level

@return \StdClass
Updates nodes information of a tree