public static function fromDbArray($arr, KalturaDetachedResponseProfile $responseProfile = null) { $newArr = new KalturaConversionProfileAssetParamsArray(); if ($arr == null) { return $newArr; } foreach ($arr as $obj) { $nObj = new KalturaConversionProfileAssetParams(); $nObj->fromObject($obj, $responseProfile); $newArr[] = $nObj; } return $newArr; }
/** * Update asset parmas of conversion profile by ID * * @action update * @param int $conversionProfileId * @param int $assetParamsId * @param KalturaConversionProfileAssetParams $conversionProfileAssetParams * @return KalturaConversionProfileAssetParams */ public function updateAction($conversionProfileId, $assetParamsId, KalturaConversionProfileAssetParams $conversionProfileAssetParams) { $conversionProfile = ConversionProfile2Peer::retrieveByPK($conversionProfileId); if (!$conversionProfile) { throw new KalturaAPIException(KalturaErrors::CONVERSION_PROFILE_ID_NOT_FOUND, $conversionProfileId); } $flavorParamsConversionProfile = flavorParamsConversionProfilePeer::retrieveByFlavorParamsAndConversionProfile($assetParamsId, $conversionProfileId); if (!$flavorParamsConversionProfile) { throw new KalturaAPIException(KalturaErrors::CONVERSION_PROFILE_ASSET_PARAMS_NOT_FOUND, $conversionProfileId, $assetParamsId); } $conversionProfileAssetParams->toUpdatableObject($flavorParamsConversionProfile); $flavorParamsConversionProfile->save(); $conversionProfileAssetParams->fromObject($flavorParamsConversionProfile); return $conversionProfileAssetParams; }
function update($conversionProfileId, $assetParamsId, KalturaConversionProfileAssetParams $conversionProfileAssetParams) { $kparams = array(); $this->client->addParam($kparams, "conversionProfileId", $conversionProfileId); $this->client->addParam($kparams, "assetParamsId", $assetParamsId); $this->client->addParam($kparams, "conversionProfileAssetParams", $conversionProfileAssetParams->toParams()); $this->client->queueServiceActionCall("conversionprofileassetparams", "update", $kparams); if ($this->client->isMultiRequest()) { return null; } $resultObject = $this->client->doQueue(); $this->client->throwExceptionIfError($resultObject); $this->client->validateObjectType($resultObject, "KalturaConversionProfileAssetParams"); return $resultObject; }