本文整理匯總了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 . "]");
}
}
}