/** * Checks for the root folder * * @param unknown_type $repositoryId * @param unknown_type $folderId * @param unknown_type $ktapi * @return unknown */ public static function isRootFolder($repositoryId, $folderId, &$ktapi) { $repository = new CMISRepository($repositoryId); $repositoryInfo = $repository->getRepositoryInfo(); // NOTE this call is required to accomodate the definition of the root folder id in the config as required by the drupal module // we should try to update the drupal module to not require this, but this way is just easier at the moment, and most of // the code accomodates it without any serious hacks $rootFolder = self::getIdFromName($repositoryInfo->getRootFolderId(), $ktapi); return $folderId == $rootFolder; }
/** * Fetches the RepositoryInfo object for a specified repository * * @param string $repositoryId * @return object $repositoryInfo */ function getRepositoryInfo($repositoryId) { $Repository = new CMISRepository($repositoryId); $repositoryInfo = $Repository->getRepositoryInfo(); return $repositoryInfo; }