当前位置: 首页>>代码示例>>PHP>>正文


PHP myPartnerUtils::getConversionProfile2ForPartner方法代码示例

本文整理汇总了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;
 }
开发者ID:DBezemer,项目名称:server,代码行数:12,代码来源:KalturaEntryService.php

示例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);
 }
开发者ID:AdiTal,项目名称:server,代码行数:42,代码来源:MediaService.php

示例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);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:21,代码来源:KalturaEntryService.php

示例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);
 }
开发者ID:DBezemer,项目名称:server,代码行数:49,代码来源:MediaService.php


注:本文中的myPartnerUtils::getConversionProfile2ForPartner方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。