Controller/MediaController.php
public function listFolders($id, $depth = 0, CachePolicy $cachePolicy = null)
        {
            $parameters = [
            'query' => ['depth' => $depth],
            'body' => json_encode([], JSON_UNESCAPED_UNICODE),
            'headers' => [],
        ];

            $result = $this->get('v1/media/' . $id . '/folders', $parameters, $cachePolicy);
            foreach ($result as &$entry) {
                $entry = new FolderResponse($entry);
            }
            unset($entry);
            reset($result);

            return $result;
        }
public function listFolders($id, $depth = 0, CachePolicy $cachePolicy = null)
        {
            $parameters = [
            'query' => ['depth' => $depth],
            'body' => json_encode([], JSON_UNESCAPED_UNICODE),
            'headers' => [],
        ];

            $result = $this->get('v1/media/' . $id . '/folders', $parameters, $cachePolicy);
            foreach ($result as &$entry) {
                $entry = new FolderResponse($entry);
            }
            unset($entry);
            reset($result);

            return $result;
        }
public function listFolders ( $ id , $ depth = 0 , CachePolicy $ cachePolicy = null ) { $ parameters = [ 'query' => [ 'depth' => $ depth ] , 'body' => json_encode ( [ ] , JSON_UNESCAPED_UNICODE ) , 'headers' => [ ] , ] ; $ result = $ this -> get ( 'v1/media/' . $ id . '/folders' , $ parameters , $ cachePolicy ) ; foreach ( $ result as & $ entry ) { $ entry = new FolderResponse ( $ entry ) ; } unset ( $ entry ) ; reset ( $ result ) ; return $ result ; }
Fetches all Folders a Media resides in.

@param int         $id          The Media identifier..
@param int         $depth       The depth for which to include existing subfolders. Use zero to exclude them all toghether..
@param CachePolicy $cachePolicy a custom cache policy used for this request only

@return FolderResponse[]
Fetches all Folders a Media resides in .