/** * Helper function to set internal repository id * * @param object $RepositoryService */ public static function setRepositoryId(&$RepositoryService = null) { if (is_null($RepositoryService)) { $RepositoryService = new RepositoryService(); } $repositories = $RepositoryService->getRepositories(); // TODO handle multiple repositories self::$repositoryId = $repositories[0]['repositoryId']; }
public function initServiceDocument() { $queryArray = split('/', trim($_SERVER['QUERY_STRING'], '/')); $workspace = strtolower(trim($queryArray[0])); if ($workspace == 'servicedocument') { include 'services/cmis/RepositoryService.inc.php'; $RepositoryService = new RepositoryService(); // fetch data for response $repositories = $RepositoryService->getRepositories(); // fetch for default first repo; NOTE that this will probably have to change at some point, quick and dirty for now $this->repositoryInfo = $RepositoryService->getRepositoryInfo($repositories[0]['repositoryId']); } }
public function __construct($baseURI = NULL) { parent::__construct(); // get repositoryInfo // NOTE currently we only support one repository, which will be the first one found in the repositories.xml config // TODO multiple repositories as individual workspaces include 'services/cmis/RepositoryService.inc.php'; $RepositoryService = new RepositoryService(); // TODO add auth requirement here, don't want to even supply service doc without auth // $RepositoryService->startSession(); // fetch data for response $repositories = $RepositoryService->getRepositories(); // fetch for default first repo; NOTE that this will probably have to change at some point, quick and dirty for now $this->repositoryInfo = $RepositoryService->getRepositoryInfo($repositories[0]['repositoryId']); }
public function PUT_action() { // call the checkin function $RepositoryService = new RepositoryService(); $VersioningService = new VersioningService(KT_cmis_atom_service_helper::getKt()); $repositories = $RepositoryService->getRepositories(); $repositoryId = $repositories[0]['repositoryId']; $response = $VersioningService->checkIn($repositoryId, $this->params[0]); if (PEAR::isError($response)) { $feed = KT_cmis_atom_service_helper::getErrorFeed($this, self::STATUS_SERVER_ERROR, $response->getMessage()); //Expose the responseFeed $this->responseFeed = $feed; return null; } $this->setStatus(self::STATUS_NO_CONTENT); $this->responseFeed = null; }