getUser($request), $folder)) { throw new AuthorizationFailedException(); } $fileRefs = $folder->file_refs->getArrayCopy(); list($offset, $limit) = $this->getOffsetAndLimit(); return $this->getPaginatedContentResponse( array_slice($fileRefs, $offset, $limit), count($fileRefs) ); } }