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


PHP KalturaCriteria::addAscendingOrderByColumn方法代码示例

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


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

示例1: 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


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