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


PHP kEventsManager::raiseEventDeferred方法代码示例

本文整理汇总了PHP中kEventsManager::raiseEventDeferred方法的典型用法代码示例。如果您正苦于以下问题:PHP kEventsManager::raiseEventDeferred方法的具体用法?PHP kEventsManager::raiseEventDeferred怎么用?PHP kEventsManager::raiseEventDeferred使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kEventsManager的用法示例。


在下文中一共展示了kEventsManager::raiseEventDeferred方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: indexToSearchIndex

 public function indexToSearchIndex()
 {
     kEventsManager::raiseEventDeferred(new kObjectReadyForIndexEvent($this));
 }
开发者ID:AdiTal,项目名称:server,代码行数:4,代码来源:entry.php

示例2: updateAccessControl

 public static function updateAccessControl($partnerId, $oldAccessControlId, $newAccessControlId)
 {
     $c = KalturaCriteria::create(entryPeer::OM_CLASS);
     //trying to fetch more entries than the $entryCount limit
     $c->setMaxRecords(self::ENTRIES_PER_ACCESS_CONTROL_UPDATE_LIMIT + 1);
     $c->add(entryPeer::ACCESS_CONTROL_ID, $oldAccessControlId);
     $partner = PartnerPeer::retrieveByPK($partnerId);
     $partnerEntitlement = $partner->getDefaultEntitlementEnforcement();
     kEntitlementUtils::initEntitlementEnforcement($partnerId, false);
     $entries = self::doSelect($c);
     $entryCount = count($entries);
     if ($entryCount == 0) {
         return;
     }
     if ($entryCount > self::ENTRIES_PER_ACCESS_CONTROL_UPDATE_LIMIT) {
         throw new kCoreException("exceeded max entries per access control update limit", kCoreException::EXCEEDED_MAX_ENTRIES_PER_ACCESS_CONTROL_UPDATE_LIMIT);
     }
     $entryIds = array();
     foreach ($entries as $entry) {
         $entryIds[] = $entry->getId();
     }
     $selectCriteria = new Criteria();
     $selectCriteria->add(entryPeer::PARTNER_ID, $partnerId);
     $selectCriteria->add(entryPeer::ID, $entryIds, Criteria::IN);
     $updateValues = new Criteria();
     $updateValues->add(entryPeer::ACCESS_CONTROL_ID, $newAccessControlId);
     $con = Propel::getConnection(self::DATABASE_NAME);
     BasePeer::doUpdate($selectCriteria, $updateValues, $con);
     foreach ($entries as $entry) {
         kEventsManager::raiseEventDeferred(new kObjectReadyForIndexEvent($entry));
     }
     if ($partnerEntitlement) {
         kEntitlementUtils::initEntitlementEnforcement($partnerId, true);
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:35,代码来源:entryPeer.php

示例3: objectAdded

 public function objectAdded(BaseObject $object, BatchJob $raisedJob = null)
 {
     KalturaLog::debug("Raising deferred event for object of type: " . get_class($object));
     kEventsManager::raiseEventDeferred(new kObjectReadyForIndexEvent($object));
     return true;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:6,代码来源:kSphinxSearchManager.php

示例4: handleEntryReplacement

 /**
  * @param entry $tempEntry
  */
 public static function handleEntryReplacement(entry $tempEntry)
 {
     $entry = entryPeer::retrieveByPK($tempEntry->getReplacedEntryId());
     if (!$entry) {
         KalturaLog::err("Real entry id [" . $tempEntry->getReplacedEntryId() . "] not found");
         myEntryUtils::deleteEntry($tempEntry, null, true);
         return;
     }
     if ($tempEntry->getStatus() == entryStatus::ERROR_CONVERTING) {
         $entry->setReplacementStatus(entryReplacementStatus::FAILED);
         $entry->save();
         // NOTE: KalturaEntryService::cancelReplace() must be used to reset this status and delete the temp entry
         return;
     }
     switch ($entry->getReplacementStatus()) {
         case entryReplacementStatus::APPROVED_BUT_NOT_READY:
             KalturaLog::log("status changed to ready");
             kEventsManager::raiseEventDeferred(new kObjectReadyForReplacmentEvent($tempEntry));
             break;
         case entryReplacementStatus::READY_BUT_NOT_APPROVED:
             break;
         case entryReplacementStatus::NOT_READY_AND_NOT_APPROVED:
             $entry->setReplacementStatus(entryReplacementStatus::READY_BUT_NOT_APPROVED);
             $entry->save();
             break;
         case entryReplacementStatus::FAILED:
             // Do nothing. KalturaEntryService::cancelReplace() will be used to delete the entry.
             break;
         case entryReplacementStatus::NONE:
         default:
             KalturaLog::err("Real entry id [" . $tempEntry->getReplacedEntryId() . "] replacement canceled");
             myEntryUtils::deleteEntry($tempEntry, null, true);
             break;
     }
 }
开发者ID:GElkayam,项目名称:server,代码行数:38,代码来源:kFlowHelper.php

示例5: indexToSearchIndex

 /**
  * Index the object in the search engine
  */
 public function indexToSearchIndex()
 {
     if ($this->getObjectType() == MetadataObjectType::DYNAMIC_OBJECT) {
         kEventsManager::raiseEventDeferred(new kObjectReadyForIndexEvent($this));
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:9,代码来源:Metadata.php

示例6: handleEntryReplacement

 /**
  * @param entry $tempEntry
  */
 public static function handleEntryReplacement(entry $tempEntry)
 {
     KalturaLog::debug("Handling temp entry id [" . $tempEntry->getId() . "] for real entry id [" . $tempEntry->getReplacedEntryId() . "]");
     $entry = entryPeer::retrieveByPK($tempEntry->getReplacedEntryId());
     if (!$entry) {
         KalturaLog::err("Real entry id [" . $tempEntry->getReplacedEntryId() . "] not found");
         myEntryUtils::deleteEntry($tempEntry, null, true);
         return;
     }
     switch ($entry->getReplacementStatus()) {
         case entryReplacementStatus::APPROVED_BUT_NOT_READY:
             KalturaLog::debug("status changed to ready");
             kEventsManager::raiseEventDeferred(new kObjectReadyForReplacmentEvent($tempEntry));
             break;
         case entryReplacementStatus::READY_BUT_NOT_APPROVED:
             break;
         case entryReplacementStatus::NOT_READY_AND_NOT_APPROVED:
             $entry->setReplacementStatus(entryReplacementStatus::READY_BUT_NOT_APPROVED);
             $entry->save();
             break;
         case entryReplacementStatus::NONE:
         default:
             KalturaLog::err("Real entry id [" . $tempEntry->getReplacedEntryId() . "] replacement canceled");
             myEntryUtils::deleteEntry($tempEntry, null, true);
             break;
     }
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:30,代码来源:kFlowHelper.php


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