You are here

public function CmisConnectionApi::getObjectById in CMIS API 8

Same name and namespace in other branches
  1. 8.2 src/CmisConnectionApi.php \Drupal\cmis\CmisConnectionApi::getObjectById()
  2. 3.0.x src/CmisConnectionApi.php \Drupal\cmis\CmisConnectionApi::getObjectById()

Get object by object id.

Return value

object Return the current object or null.

File

src/CmisConnectionApi.php, line 244

Class

CmisConnectionApi
Description of CmisConnectionApi

Namespace

Drupal\cmis

Code

public function getObjectById($id = '') {
  if (empty($id)) {
    return NULL;
  }
  if (!empty($this
    ->validObjectId($id) || !empty($this
    ->validObjectId($id, 'cmis:document')))) {
    $cid = $this->session
      ->createObjectId($id);
    $object = $this->session
      ->getObject($cid);
    return $object;
  }
  return NULL;
}