public static function fromDbArray($arr, KalturaDetachedResponseProfile $responseProfile = null) { $newArr = new KalturaFileAssetArray(); if ($arr == null) { return $newArr; } foreach ($arr as $obj) { $nObj = new KalturaFileAsset(); $nObj->fromObject($obj, $responseProfile); $newArr[] = $nObj; } return $newArr; }
/** * Set content of file asset * * @action setContent * @param string $id * @param KalturaContentResource $contentResource * @return KalturaFileAsset * @throws KalturaErrors::FILE_ASSET_ID_NOT_FOUND * @throws KalturaErrors::UPLOADED_FILE_NOT_FOUND_BY_TOKEN * @throws KalturaErrors::RECORDED_WEBCAM_FILE_NOT_FOUND * @throws KalturaErrors::RESOURCE_TYPE_NOT_SUPPORTED */ function setContentAction($id, KalturaContentResource $contentResource) { $dbFileAsset = FileAssetPeer::retrieveByPK($id); if (!$dbFileAsset) { throw new KalturaAPIException(KalturaErrors::FILE_ASSET_ID_NOT_FOUND, $id); } $kContentResource = $contentResource->toObject(); $this->attachContentResource($dbFileAsset, $kContentResource); $fileAsset = new KalturaFileAsset(); $fileAsset->fromObject($dbFileAsset, $this->getResponseProfile()); return $fileAsset; }