private function CmisConnectionApi::setRepository in CMIS API 8
Same name and namespace in other branches
- 8.2 src/CmisConnectionApi.php \Drupal\cmis\CmisConnectionApi::setRepository()
- 3.0.x src/CmisConnectionApi.php \Drupal\cmis\CmisConnectionApi::setRepository()
Set repository.
1 call to CmisConnectionApi::setRepository()
- CmisConnectionApi::setSessionFactory in src/
CmisConnectionApi.php - Set session factory.
File
- src/
CmisConnectionApi.php, line 198
Class
- CmisConnectionApi
- Description of CmisConnectionApi
Namespace
Drupal\cmisCode
private function setRepository() {
$repository_id = $this->config
->getCmisRepository();
// If no repository id is defined use the first repository
if ($repository_id === NULL || $repository_id == '') {
$repositories = $this->sessionFactory
->getRepositories($this->parameters);
$this->parameters[\Dkd\PhpCmis\SessionParameter::REPOSITORY_ID] = $repositories[0]
->getId();
}
else {
$this->parameters[\Dkd\PhpCmis\SessionParameter::REPOSITORY_ID] = $repository_id;
}
$this->session = $this->sessionFactory
->createSession($this->parameters);
$this
->setRootFolder();
}