本文整理汇总了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);
}