當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BatchJobPeer::retrieveByEntryIdAndType方法代碼示例

本文整理匯總了PHP中BatchJobPeer::retrieveByEntryIdAndType方法的典型用法代碼示例。如果您正苦於以下問題:PHP BatchJobPeer::retrieveByEntryIdAndType方法的具體用法?PHP BatchJobPeer::retrieveByEntryIdAndType怎麽用?PHP BatchJobPeer::retrieveByEntryIdAndType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BatchJobPeer的用法示例。


在下文中一共展示了BatchJobPeer::retrieveByEntryIdAndType方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getClientNotificationAction

 /**
  * Return the notifications for a specific entry id and type
  * 
  * @action getClientNotification
  * @param string $entryId
  * @param KalturaNotificationType $type
  * @return KalturaClientNotification
  */
 function getClientNotificationAction($entryId, $type)
 {
     // in case of a multirequest, a mediaService.addFromUploadedFile may fail and therefore the resulting entry id will be empty
     // in such a case return immidiately without looking for the notification
     if ($entryId == '') {
         throw new KalturaAPIException(KalturaErrors::NOTIFICATION_FOR_ENTRY_NOT_FOUND, $entryId);
     }
     $notifications = BatchJobPeer::retrieveByEntryIdAndType($entryId, BatchJobType::NOTIFICATION, $type);
     // FIXME: throw error if not found
     if (count($notifications) == 0) {
         throw new KalturaAPIException(KalturaErrors::NOTIFICATION_FOR_ENTRY_NOT_FOUND, $entryId);
     }
     $notification = $notifications[0];
     $partnerId = $this->getPartnerId();
     $nofication_config_str = null;
     list($nofity, $nofication_config_str) = myPartnerUtils::shouldNotify($partnerId);
     if (!$nofity) {
         return new KalturaClientNotification();
     }
     $nofication_config = myNotificationsConfig::getInstance($nofication_config_str);
     $nofity_send_type = $nofication_config->shouldNotify($type);
     if ($nofity_send_type != myNotificationMgr::NOTIFICATION_MGR_SEND_SYNCH && $nofity_send_type != myNotificationMgr::NOTIFICATION_MGR_SEND_BOTH) {
         return new KalturaClientNotification();
     }
     $partner = PartnerPeer::retrieveByPK($partnerId);
     list($url, $signatureKey) = myNotificationMgr::getPartnerNotificationInfo($partner);
     list($params, $rawSignature) = myNotificationMgr::prepareNotificationData($url, $signatureKey, $notification, null);
     $serializedParams = http_build_query($params, "", "&");
     $result = new KalturaClientNotification();
     $result->url = $url;
     $result->data = $serializedParams;
     return $result;
 }
開發者ID:richhl,項目名稱:kalturaCE,代碼行數:41,代碼來源:NotificationService.php

示例2: disableAutoThumbnailCreation

 /**
  * Disable any automatic thumbnail creation by the conversion jobs
  * 
  * @param string $entryId
  */
 public static function disableAutoThumbnailCreation($entryId)
 {
     $convertProfileJobs = BatchJobPeer::retrieveByEntryIdAndType($entryId, BatchJobType::CONVERT_PROFILE);
     foreach ($convertProfileJobs as $convertProfileJob) {
         $convertProfileJobData = $convertProfileJob->getData();
         if ($convertProfileJobData instanceof kConvertProfileJobData && $convertProfileJobData->getCreateThumb()) {
             $convertProfileJobData->setCreateThumb(false);
             $convertProfileJob->setData($convertProfileJobData);
             $convertProfileJob->save();
         }
     }
 }
開發者ID:richhl,項目名稱:kalturaCE,代碼行數:17,代碼來源:myEntryUtils.class.php


注:本文中的BatchJobPeer::retrieveByEntryIdAndType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。