You are here

function CMISRepositoryWrapper::connect in CMIS API 6.3

Same name and namespace in other branches
  1. 6.4 cmis_common/lib/cmis_repository_wrapper.php \CMISRepositoryWrapper::connect()
  2. 7 cmis_common/lib/cmis_repository_wrapper.php \CMISRepositoryWrapper::connect()
1 call to CMISRepositoryWrapper::connect()
CMISRepositoryWrapper::__construct in cmis_common/lib/cmis_repository_wrapper.php

File

cmis_common/lib/cmis_repository_wrapper.php, line 41

Class

CMISRepositoryWrapper

Code

function connect($url, $username, $password, $options) {

  // TODO: Make this work with cookies
  $this->url = $url;
  $this->username = $username;
  $this->password = $password;
  $this->auth_options = $options;
  $this->authenticated = false;
  $retval = $this
    ->doGet($this->url);
  if ($retval->code == 200 || $retval->code == 201) {
    $this->authenticated = true;
    $this->workspace = CMISRepositoryWrapper::extractWorkspace($retval->body);
  }
}