public function fetchTree($rootId=null, $depth=null)
    {
        $wrappers = $this->fetchTreeAsArray($rootId, $depth);

        return (!is_array($wrappers) || empty($wrappers)) ? null : $wrappers[0];
    }
public function fetchTree($rootId=null, $depth=null)
    {
        $wrappers = $this->fetchTreeAsArray($rootId, $depth);

        return (!is_array($wrappers) || empty($wrappers)) ? null : $wrappers[0];
    }
public function fetchTree ( $ rootId = null , $ depth = null ) { $ wrappers = $ this -> fetchTreeAsArray ( $ rootId , $ depth ) ; return ( ! is_array ( $ wrappers ) || empty ( $ wrappers ) ) ? null : $ wrappers [ 0 ] ; }
Fetches the complete tree, returning the root node of the tree

@param mixed $rootId the root id of the tree (or null if model doesn't
support multiple trees
@param int $depth the depth to retrieve or null for unlimited

@return NodeWrapper $root
Fetches the complete tree returning the root node of the tree