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


PHP KalturaCriteria::add方法代码示例

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


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

示例1: fetchNextPage

 private function fetchNextPage()
 {
     $this->entriesCurrentPage = null;
     $this->clearMemory();
     if ($this->currentCriteria) {
         if ($this->lastEntryIntId && $this->lastEntryCreatedAt) {
             $this->currentCriteria->add(entryPeer::INT_ID, $this->lastEntryIntId, Criteria::LESS_THAN);
             $this->currentCriteria->add(entryPeer::CREATED_AT, $this->lastEntryCreatedAt, Criteria::LESS_EQUAL);
         }
     } else {
         $this->currentCriteria = $this->getNextCriteria();
         if (!$this->currentCriteria) {
             return;
         }
     }
     $nextPage = entryPeer::doSelect($this->currentCriteria);
     if (!count($nextPage)) {
         $this->currentCriteria = $this->getNextCriteria();
         if (!$this->currentCriteria) {
             return;
         }
         $nextPage = entryPeer::doSelect($this->currentCriteria);
     }
     if (!count($nextPage)) {
         // finished all criterias and pages
         return;
     }
     $this->entriesCurrentPage = $nextPage;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:29,代码来源:KalturaSyndicationFeedRenderer.php

示例2: fetchNextPage

 private function fetchNextPage()
 {
     if ($this->executed && $this->staticPlaylist) {
         return;
     }
     $this->entriesCurrentPage = null;
     kMemoryManager::clearMemory();
     if ($this->currentCriteria) {
         if ($this->lastEntryCreatedAt) {
             $this->currentCriteria->add($this->getOrderByColumn(), $this->lastEntryCreatedAt, Criteria::LESS_EQUAL);
         }
         if (count($this->lastEntryIds)) {
             $this->currentCriteria->add(entryPeer::ID, $this->lastEntryIds, Criteria::NOT_IN);
         }
     } else {
         $this->currentCriteria = $this->getNextCriteria();
         if (!$this->currentCriteria) {
             return;
         }
     }
     $nextPage = entryPeer::doSelect($this->currentCriteria);
     if (!count($nextPage)) {
         $this->currentCriteria = $this->getNextCriteria();
         if (!$this->currentCriteria) {
             return;
         }
         $nextPage = entryPeer::doSelect($this->currentCriteria);
     }
     if (!count($nextPage)) {
         // finished all criterias and pages
         return;
     }
     if ($this->staticPlaylist) {
         //order the entries by static (AKA manual) entries order
         $nextPageEntries = array();
         foreach ($nextPage as $entry) {
             $nextPageEntries[$entry->getId()] = $entry;
         }
         $nextPage = array();
         foreach ($this->staticPlaylistEntriesIdsOrder as $entryId) {
             if (isset($nextPageEntries[$entryId])) {
                 $nextPage[] = $nextPageEntries[$entryId];
             }
         }
     }
     $this->entriesCurrentPage = $nextPage;
     reset($this->entriesCurrentPage);
 }
开发者ID:AdiTal,项目名称:server,代码行数:48,代码来源:KalturaSyndicationFeedRenderer.php

示例3: copyCuePointsToClipEntry

 /**
  *
  * @param entry $clipEntry new entry to copy and adjust cue points from root entry to
  */
 public static function copyCuePointsToClipEntry(entry $clipEntry)
 {
     $clipAtts = self::getClipAttributesFromEntry($clipEntry);
     if (!is_null($clipAtts)) {
         $sourceEntry = entryPeer::retrieveByPK($clipEntry->getSourceEntryId());
         if (is_null($sourceEntry)) {
             KalturaLog::info("Didn't copy cuePoints for entry [{$clipEntry->getId()}] because source entry [" . $clipEntry->getSourceEntryId() . "] wasn't found");
             return;
         }
         $sourceEntryDuration = $sourceEntry->getLengthInMsecs();
         $clipStartTime = $clipAtts->getOffset();
         if (is_null($clipStartTime)) {
             $clipStartTime = 0;
         }
         $clipDuration = $clipAtts->getDuration();
         if (is_null($clipDuration)) {
             $clipDuration = $sourceEntryDuration;
         }
         $c = new KalturaCriteria();
         $c->add(CuePointPeer::ENTRY_ID, $clipEntry->getSourceEntryId());
         if ($clipDuration < $sourceEntryDuration) {
             $c->addAnd(CuePointPeer::START_TIME, $clipStartTime + $clipDuration, KalturaCriteria::LESS_EQUAL);
         }
         if ($clipStartTime > 0) {
             $c->addAnd(CuePointPeer::START_TIME, $clipStartTime, KalturaCriteria::GREATER_EQUAL);
             $c->addOr(CuePointPeer::START_TIME, 0, KalturaCriteria::EQUAL);
         }
         $c->addAscendingOrderByColumn(CuePointPeer::CREATED_AT);
         $rootEntryCuePointsToCopy = CuePointPeer::doSelect($c);
         if (count($rootEntryCuePointsToCopy) <= self::MAX_CUE_POINTS_TO_COPY_TO_CLIP) {
             foreach ($rootEntryCuePointsToCopy as $cuePoint) {
                 $cuePoint->copyToClipEntry($clipEntry, $clipStartTime, $clipDuration);
             }
         } else {
             KalturaLog::alert("Can't copy cuePoints for entry [{$clipEntry->getId()}] because cuePoints count exceeded max limit of [" . self::MAX_CUE_POINTS_TO_COPY_TO_CLIP . "]");
         }
     }
 }
开发者ID:dozernz,项目名称:server,代码行数:42,代码来源:kCuePointManager.php

示例4: add

 public function add($p1, $value = null, $comparison = null)
 {
     if ($p1 instanceof Criterion) {
         $oc = $this->getCriterion($p1->getColumn());
         if (!is_null($oc) && $oc->getValue() == $p1->getValue() && $oc->getComparison() != $p1->getComparison()) {
             return $this;
         }
         return parent::add($p1);
     }
     $nc = new SolrEntryCriterion($this, $p1, $value, $comparison);
     return parent::add($nc);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:12,代码来源:SolrEntryCriteria.php


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