kernel/private/classes/webdav/ezwebdavcontentbackend.php
protected function getNodes( $requestUri, $depth )
    {
        $source = $requestUri;
        $nodeInfo = $this->getNodeInfo( $requestUri );

        if ( !$nodeInfo['nodeExists'] )
        {
            return array();
        }

        // No special handling for plain resources
        if ( !$nodeInfo['isCollection'] )
        {
            return array( new ezcWebdavResource( $source, $this->getAllProperties( $source ) ) );
        }

        // For zero depth just return the collection
        if ( $depth === ezcWebdavRequest::DEPTH_ZERO )
        {
            return array( new ezcWebdavCollection( $source, $this->getAllProperties( $source ) ) );
        }

        $nodes = array( new ezcWebdavCollection( $source, $this->getAllProperties( $source ) ) );
        $recurseCollections = array( $source );

        // Collect children for all collections listed in $recurseCollections.
        for ( $i = 0; $i < count( $recurseCollections ); ++$i )
        {
            $source = $recurseCollections[$i];

            // add the slash at the end of the path if it is missing
            if ( $source{strlen( $source ) - 1} !== '/' )
            {
                $source .= '/';
            }
            $children = $this->getCollectionMembers( $source, $depth );

            foreach ( $children as $child )
            {
                $nodes[] = $child;

                // Check if we should recurse deeper, and add collections to
                // processing list in this case.
                if ( $child instanceof ezcWebdavCollection
                     && $depth === ezcWebdavRequest::DEPTH_INFINITY
                     && $child->path !== $source ) // @as added for recursive DEPTH_INFINITY
                {
                    $recurseCollections[] = $child->path;
                }
            }
        }

        return $nodes;
    }
protected function getNodes( $requestUri, $depth )
    {
        $source = $requestUri;
        $nodeInfo = $this->getNodeInfo( $requestUri );

        if ( !$nodeInfo['nodeExists'] )
        {
            return array();
        }

        // No special handling for plain resources
        if ( !$nodeInfo['isCollection'] )
        {
            return array( new ezcWebdavResource( $source, $this->getAllProperties( $source ) ) );
        }

        // For zero depth just return the collection
        if ( $depth === ezcWebdavRequest::DEPTH_ZERO )
        {
            return array( new ezcWebdavCollection( $source, $this->getAllProperties( $source ) ) );
        }

        $nodes = array( new ezcWebdavCollection( $source, $this->getAllProperties( $source ) ) );
        $recurseCollections = array( $source );

        // Collect children for all collections listed in $recurseCollections.
        for ( $i = 0; $i < count( $recurseCollections ); ++$i )
        {
            $source = $recurseCollections[$i];

            // add the slash at the end of the path if it is missing
            if ( $source{strlen( $source ) - 1} !== '/' )
            {
                $source .= '/';
            }
            $children = $this->getCollectionMembers( $source, $depth );

            foreach ( $children as $child )
            {
                $nodes[] = $child;

                // Check if we should recurse deeper, and add collections to
                // processing list in this case.
                if ( $child instanceof ezcWebdavCollection
                     && $depth === ezcWebdavRequest::DEPTH_INFINITY
                     && $child->path !== $source ) // @as added for recursive DEPTH_INFINITY
                {
                    $recurseCollections[] = $child->path;
                }
            }
        }

        return $nodes;
    }
protected function getNodes ( $ requestUri , $ depth ) { $ source = $ requestUri ; $ nodeInfo = $ this -> getNodeInfo ( $ requestUri ) ; if ( ! $ nodeInfo [ 'nodeExists' ] ) { return array ( ) ; } // No special handling for plain resources if ( ! $ nodeInfo [ 'isCollection' ] ) { return array ( new ezcWebdavResource ( $ source , $ this -> getAllProperties ( $ source ) ) ) ; } // For zero depth just return the collection if ( $ depth === ezcWebdavRequest :: DEPTH_ZERO ) { return array ( new ezcWebdavCollection ( $ source , $ this -> getAllProperties ( $ source ) ) ) ; } $ nodes = array ( new ezcWebdavCollection ( $ source , $ this -> getAllProperties ( $ source ) ) ) ; $ recurseCollections = array ( $ source ) ; // Collect children for all collections listed in $recurseCollections. for ( $ i = 0 ; $ i < count ( $ recurseCollections ) ; ++ $ i ) { $ source = $ recurseCollections [ $ i ] ; // add the slash at the end of the path if it is missing if ( $ source { strlen ( $ source ) - 1 } !== '/' ) { $ source .= '/' ; } $ children = $ this -> getCollectionMembers ( $ source , $ depth ) ; foreach ( $ children as $ child ) { $ nodes [ ] = $ child ; // Check if we should recurse deeper, and add collections to // processing list in this case. if ( $ child instanceof ezcWebdavCollection && $ depth === ezcWebdavRequest :: DEPTH_INFINITY && $ child -> path !== $ source ) // @as added for recursive DEPTH_INFINITY { $ recurseCollections [ ] = $ child -> path ; } } } return $ nodes ; }
Returns all child nodes.

Get all nodes from the resource identified by $source up to the given
depth. Reuses the method {@link getCollectionMembers()}, but you may
want to overwrite this implementation by somethings which fits better
with your backend.

@param string $source
@param int $depth
@return array(ezcWebdavResource|ezcWebdavCollection)
Returns all child nodes .