public static function fromEntryArray($arr)
 {
     $newArr = new KalturaDocumentEntryArray();
     if ($arr == null) {
         return $newArr;
     }
     foreach ($arr as $obj) {
         $nObj = new KalturaDocumentEntry();
         $nObj->fromObject($obj);
         $newArr[] = $nObj;
     }
     return $newArr;
 }
 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;
 }
Example #3
0
 /**
  * Get document entry by ID.
  * 
  * @action get
  * @param string $entryId Document entry id
  * @param int $version Desired version of the data
  * @return KalturaDocumentEntry The requested document entry
  * 
  * @throws KalturaErrors::ENTRY_ID_NOT_FOUND
  */
 function getAction($entryId, $version = -1)
 {
     $dbEntry = entryPeer::retrieveByPK($entryId);
     if (!$dbEntry || $dbEntry->getType() != KalturaEntryType::DOCUMENT) {
         throw new KalturaAPIException(KalturaErrors::ENTRY_ID_NOT_FOUND, $entryId);
     }
     if ($version !== -1) {
         $dbEntry->setDesiredVersion($version);
     }
     $docEntry = new KalturaDocumentEntry();
     $docEntry->fromObject($dbEntry, $this->getResponseProfile());
     return $docEntry;
 }