本文整理匯總了PHP中myPartnerUtils::getConversionProfile2ForPartner方法的典型用法代碼示例。如果您正苦於以下問題:PHP myPartnerUtils::getConversionProfile2ForPartner方法的具體用法?PHP myPartnerUtils::getConversionProfile2ForPartner怎麽用?PHP myPartnerUtils::getConversionProfile2ForPartner使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類myPartnerUtils
的用法示例。
在下文中一共展示了myPartnerUtils::getConversionProfile2ForPartner方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: duplicateTemplateEntry
protected function duplicateTemplateEntry($conversionProfileId)
{
$dbEntry = null;
$conversionProfile = myPartnerUtils::getConversionProfile2ForPartner($this->getPartnerId(), $conversionProfileId);
if ($conversionProfile && $conversionProfile->getDefaultEntryId()) {
$templateEntry = entryPeer::retrieveByPKNoFilter($conversionProfile->getDefaultEntryId(), null, false);
if ($templateEntry) {
$dbEntry = $templateEntry->copyTemplate(true);
}
}
return $dbEntry;
}
示例2: replaceResource
/**
* @param KalturaResource $resource
* @param entry $dbEntry
* @param int $conversionProfileId
*/
protected function replaceResource(KalturaResource $resource, entry $dbEntry, $conversionProfileId = null, $advancedOptions = null)
{
if ($advancedOptions) {
$dbEntry->setReplacementOptions($advancedOptions->toObject());
$dbEntry->save();
}
if ($dbEntry->getStatus() == KalturaEntryStatus::NO_CONTENT || $dbEntry->getMediaType() == KalturaMediaType::IMAGE) {
$resource->validateEntry($dbEntry);
if ($conversionProfileId) {
$dbEntry->setConversionQuality($conversionProfileId);
$dbEntry->save();
}
$kResource = $resource->toObject();
$this->attachResource($kResource, $dbEntry);
} else {
$tempMediaEntry = new KalturaMediaEntry();
$tempMediaEntry->type = $dbEntry->getType();
$tempMediaEntry->mediaType = $dbEntry->getMediaType();
if (!$conversionProfileId) {
$originalConversionProfileId = $dbEntry->getConversionQuality();
$conversionProfile = conversionProfile2Peer::retrieveByPK($originalConversionProfileId);
if (is_null($conversionProfile) || $conversionProfile->getType() != ConversionProfileType::MEDIA) {
$defaultConversionProfile = myPartnerUtils::getConversionProfile2ForPartner($this->getPartnerId());
if (!is_null($defaultConversionProfile)) {
$conversionProfileId = $defaultConversionProfile->getId();
}
} else {
$conversionProfileId = $originalConversionProfileId;
}
}
if ($conversionProfileId) {
$tempMediaEntry->conversionProfileId = $conversionProfileId;
}
$this->replaceResourceByEntry($dbEntry, $resource, $tempMediaEntry);
}
$resource->entryHandled($dbEntry);
}
示例3: add
/**
* Adds entry
*
* @param KalturaBaseEntry $entry
* @return entry
*/
protected function add(KalturaBaseEntry $entry, $conversionProfileId = null)
{
$dbEntry = null;
$conversionProfile = myPartnerUtils::getConversionProfile2ForPartner($this->getPartnerId(), $conversionProfileId);
if ($conversionProfile && $conversionProfile->getDefaultEntryId()) {
$templateEntry = entryPeer::retrieveByPK($conversionProfile->getDefaultEntryId());
if ($templateEntry) {
$dbEntry = $templateEntry->copyTemplate(true);
$dbEntry->save();
} else {
KalturaLog::err("Template entry id [" . $conversionProfile->getDefaultEntryId() . "] not found");
}
}
return $this->prepareEntryForInsert($entry, $dbEntry);
}
示例4: replaceResource
/**
* @param KalturaResource $resource
* @param entry $dbEntry
* @param int $conversionProfileId
*/
protected function replaceResource(KalturaResource $resource, entry $dbEntry, $conversionProfileId = null, $advancedOptions = null)
{
if ($advancedOptions) {
$dbEntry->setReplacementOptions($advancedOptions->toObject());
$dbEntry->save();
}
if ($dbEntry->getStatus() == KalturaEntryStatus::NO_CONTENT || $dbEntry->getMediaType() == KalturaMediaType::IMAGE) {
$resource->validateEntry($dbEntry);
if ($conversionProfileId) {
$dbEntry->setConversionQuality($conversionProfileId);
$dbEntry->save();
}
$kResource = $resource->toObject();
$this->attachResource($kResource, $dbEntry);
} else {
$kResource = $resource->toObject();
if ($kResource instanceof kOperationResource && $this->isResourceKClip($kResource)) {
$internalResource = $kResource->getResource();
if ($dbEntry->getIsTrimDisabled() && $internalResource instanceof kFileSyncResource && $dbEntry->getId() == $internalResource->getOriginEntryId()) {
throw new KalturaAPIException(KalturaErrors::ENTRY_CANNOT_BE_TRIMMED);
}
}
$tempMediaEntry = new KalturaMediaEntry();
$tempMediaEntry->type = $dbEntry->getType();
$tempMediaEntry->mediaType = $dbEntry->getMediaType();
if (!$conversionProfileId) {
$originalConversionProfileId = $dbEntry->getConversionQuality();
$conversionProfile = conversionProfile2Peer::retrieveByPK($originalConversionProfileId);
if (is_null($conversionProfile) || $conversionProfile->getType() != ConversionProfileType::MEDIA) {
$defaultConversionProfile = myPartnerUtils::getConversionProfile2ForPartner($this->getPartnerId());
if (!is_null($defaultConversionProfile)) {
$conversionProfileId = $defaultConversionProfile->getId();
}
} else {
$conversionProfileId = $originalConversionProfileId;
}
}
if ($conversionProfileId) {
$tempMediaEntry->conversionProfileId = $conversionProfileId;
}
$this->replaceResourceByEntry($dbEntry, $resource, $tempMediaEntry);
}
$resource->entryHandled($dbEntry);
}