本文整理汇总了PHP中OW_Example::setOrder方法的典型用法代码示例。如果您正苦于以下问题:PHP OW_Example::setOrder方法的具体用法?PHP OW_Example::setOrder怎么用?PHP OW_Example::setOrder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OW_Example
的用法示例。
在下文中一共展示了OW_Example::setOrder方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: findListByAffiliateId
/**
* @param int $affiliateId
* @return array
*/
public function findListByAffiliateId($affiliateId)
{
$example = new OW_Example();
$example->andFieldEqual('affiliateId', $affiliateId);
$example->setOrder('`paymentDate` DESC');
return $this->findListByExample($example);
}
示例2: getTopInviters
/**
* get top inviters
* @param array $params
* @return array YNCONTACTIMPORTER_BOL_Statistic
*/
public function getTopInviters($params = array())
{
$example = new OW_Example();
$example->setLimitClause(0, 10);
$example->setOrder("`totalSent` DESC");
return $this->findListByExample($example);
}
示例3: findList
public function findList($count)
{
$example = new OW_Example();
$example->setLimitClause(0, $count);
$example->setOrder('timeStamp DESC');
return $this->findListByExample($example);
}
示例4: findListByCategoryId
public function findListByCategoryId($id)
{
$example = new OW_Example();
$example->andFieldEqual('categoryId', $id);
$example->setOrder('`order` ASC');
return $this->findListByExample($example);
}
示例5: findByGroup
public function findByGroup($groupId)
{
$example = new OW_Example();
$example->andFieldEqual('groupId', $groupId);
$example->setOrder('timestamp DESC');
return $this->findListByExample($example);
}
示例6: getGoalLatestDonations
public function getGoalLatestDonations($goalId, $limit)
{
$example = new OW_Example();
$example->andFieldEqual('goalId', $goalId);
$example->setOrder('`donationStamp` DESC');
$example->setLimitClause(0, $limit);
return $this->findListByExample($example);
}
示例7: findLast
/**
* Finds user last action log
*
* @param int $userId
* @param int $actionId
*/
public function findLast($userId, $actionId)
{
$example = new OW_Example();
$example->andFieldEqual('userId', $userId);
$example->andFieldEqual('actionId', $actionId);
$example->setOrder('`logTimestamp` DESC');
$example->setLimitClause(0, 1);
return $this->findObjectByExample($example);
}
示例8: getUpdatedActions
public function getUpdatedActions()
{
$ex = new OW_Example();
$ex->andFieldEqual(PRIVACY_BOL_CronDao::IN_PROCESS, 0);
$ex->setOrder(PRIVACY_BOL_CronDao::TIMESTAMP);
$ex->setLimitClause(0, 500);
$objectList = $this->findListByExample($ex);
return $objectList;
}
示例9: getAllPacks
/**
* Returns list of packs for account type
*
* @param $accountTypeId
* @return array
*/
public function getAllPacks($accountTypeId = null)
{
$example = new OW_Example();
if ($accountTypeId) {
$example->andFieldEqual('accountTypeId', $accountTypeId);
}
$example->setOrder('`price` ASC');
return $this->findListByExample($example);
}
示例10: findUserGuests
/**
* @param $userId
* @param $page
* @param $limit
* @return array|mixed
*/
public function findUserGuests($userId, $page, $limit)
{
$first = ($page - 1) * $limit;
$example = new OW_Example();
$example->andFieldEqual('userId', $userId);
$example->setLimitClause($first, $limit);
$example->setOrder('`visitTimestamp` DESC');
return $this->findListByExample($example);
}
示例11: findHotList
public function findHotList($start = 0, $count = null)
{
$example = new OW_Example();
$example->setOrder("`timestamp` DESC");
if ($count !== null) {
$example->setLimitClause($start, $count);
}
return $this->findListByExample($example);
}
示例12: findByEntityTypeList
/**
*
* @param array $entityTypes
* @return array
*/
public function findByEntityTypeList($entityTypes, array $limit = null)
{
$example = new OW_Example();
$example->andFieldInArray("entityType", $entityTypes);
if (!empty($limit)) {
$example->setLimitClause($limit[0], $limit[1]);
}
$example->setOrder("timeStamp DESC");
return $this->findListByExample($example);
}
示例13: getAllProviders
/**
* find All Provider
*
* @param array $params
* @return array YNCONTACTIMPORTER_BOL_Provider
*/
public function getAllProviders($params = array())
{
$example = new OW_Example();
if (isset($params['limit'])) {
$example->setLimitClause(0, $params['limit']);
}
if (isset($params['enable'])) {
$example->andFieldEqual('enable', $params['enable']);
}
$example->setOrder("`order`");
return $this->providerDao->getAllProviders($example);
}
示例14: getAllSteps
public function getAllSteps($page, $onlyActive = 1)
{
$example = new OW_Example();
if ($page != 'all') {
$example->andFieldEqual('page', $page);
}
if ($onlyActive == 1) {
$example->andFieldEqual('active', 1);
}
$example->setOrder('`page` ASC,`order` ASC');
return $this->findListByExample($example);
}
示例15: processScheduler
public function processScheduler()
{
/**
* following step to speed up & beat performance
* 1. check album limit
* 2. check quota limit
* 3. get nodes of this schedulers
* 4. get all items of current schedulers.
* 5. process each node
* 5.1 check required quota
* 5.2 fetch data to pubic file
* 5.3 store to file model
* 6. check status of schedulers, if scheduler is completed == (remaining == 0)
* 6.1 udpate feed and message.
*/
/**
* Unlimited time.
*/
set_time_limit(0);
/**
* default 20
* @var int
*/
$configs = OW::getConfig()->getValues('ynmediaimporter');
$limitUserPerCron = $configs['number_photo'] ? intval($configs['number_photo']) : 20;
/**
* default 20
* @var int
*/
$limitQueuePerCron = $configs['number_queue'] ? intval($configs['number_queue']) : 20;
/**
* process number queue.
*/
/**
* get scheduler from tables data.
*/
$example = new OW_Example();
$example->andFieldLessThan('status', '3');
$example->setOrder('last_run');
$example->setLimitClause($first, $count)->setLimitClause(0, $limitQueuePerCron);
$schedulers = YNMEDIAIMPORTER_BOL_SchedulerDao::getInstance()->findListByExample($example);
foreach ($schedulers as $scheduler) {
Ynmediaimporter::processScheduler($scheduler, 0, $limitUserPerCron, 1, 1);
}
echo "success!";
exit(0);
}