You are here

class KalturaDocumentService in Kaltura 6.2

Hierarchy

Expanded class hierarchy of KalturaDocumentService

File

kaltura_client/KalturaClient.php, line 3733

View source
class KalturaDocumentService extends KalturaServiceBase {
  function __construct(KalturaClient $client) {
    parent::__construct($client);
  }
  function addFromUploadedFile(KalturaDocumentEntry $documentEntry, $uploadTokenId) {
    $kparams = array();
    $this->client
      ->addParam($kparams, "documentEntry", $documentEntry
      ->toParams());
    $this->client
      ->addParam($kparams, "uploadTokenId", $uploadTokenId);
    $this->client
      ->queueServiceActionCall("document", "addFromUploadedFile", $kparams);
    if ($this->client
      ->isMultiRequest()) {
      return null;
    }
    $resultObject = $this->client
      ->doQueue();
    $this->client
      ->throwExceptionIfError($resultObject);
    $this->client
      ->validateObjectType($resultObject, "KalturaDocumentEntry");
    return $resultObject;
  }
  function get($entryId, $version = -1) {
    $kparams = array();
    $this->client
      ->addParam($kparams, "entryId", $entryId);
    $this->client
      ->addParam($kparams, "version", $version);
    $this->client
      ->queueServiceActionCall("document", "get", $kparams);
    if ($this->client
      ->isMultiRequest()) {
      return null;
    }
    $resultObject = $this->client
      ->doQueue();
    $this->client
      ->throwExceptionIfError($resultObject);
    $this->client
      ->validateObjectType($resultObject, "KalturaDocumentEntry");
    return $resultObject;
  }
  function update($entryId, KalturaDocumentEntry $documentEntry) {
    $kparams = array();
    $this->client
      ->addParam($kparams, "entryId", $entryId);
    $this->client
      ->addParam($kparams, "documentEntry", $documentEntry
      ->toParams());
    $this->client
      ->queueServiceActionCall("document", "update", $kparams);
    if ($this->client
      ->isMultiRequest()) {
      return null;
    }
    $resultObject = $this->client
      ->doQueue();
    $this->client
      ->throwExceptionIfError($resultObject);
    $this->client
      ->validateObjectType($resultObject, "KalturaDocumentEntry");
    return $resultObject;
  }
  function delete($entryId) {
    $kparams = array();
    $this->client
      ->addParam($kparams, "entryId", $entryId);
    $this->client
      ->queueServiceActionCall("document", "delete", $kparams);
    if ($this->client
      ->isMultiRequest()) {
      return null;
    }
    $resultObject = $this->client
      ->doQueue();
    $this->client
      ->throwExceptionIfError($resultObject);
    $this->client
      ->validateObjectType($resultObject, "null");
    return $resultObject;
  }
  function listAction(KalturaDocumentEntryFilter $filter = null, KalturaFilterPager $pager = null) {
    $kparams = array();
    if ($filter !== null) {
      $this->client
        ->addParam($kparams, "filter", $filter
        ->toParams());
    }
    if ($pager !== null) {
      $this->client
        ->addParam($kparams, "pager", $pager
        ->toParams());
    }
    $this->client
      ->queueServiceActionCall("document", "list", $kparams);
    if ($this->client
      ->isMultiRequest()) {
      return null;
    }
    $resultObject = $this->client
      ->doQueue();
    $this->client
      ->throwExceptionIfError($resultObject);
    $this->client
      ->validateObjectType($resultObject, "KalturaDocumentListResponse");
    return $resultObject;
  }
  function upload($fileData) {
    $kparams = array();
    $kfiles = array();
    $this->client
      ->addParam($kfiles, "fileData", $fileData);
    $this->client
      ->queueServiceActionCall("document", "upload", $kparams, $kfiles);
    if ($this->client
      ->isMultiRequest()) {
      return null;
    }
    $resultObject = $this->client
      ->doQueue();
    $this->client
      ->throwExceptionIfError($resultObject);
    $this->client
      ->validateObjectType($resultObject, "string");
    return $resultObject;
  }
  function convertPptToSwf($entryId) {
    $kparams = array();
    $this->client
      ->addParam($kparams, "entryId", $entryId);
    $this->client
      ->queueServiceActionCall("document", "convertPptToSwf", $kparams);
    if ($this->client
      ->isMultiRequest()) {
      return null;
    }
    $resultObject = $this->client
      ->doQueue();
    $this->client
      ->throwExceptionIfError($resultObject);
    $this->client
      ->validateObjectType($resultObject, "string");
    return $resultObject;
  }

}

Members