本文整理匯總了PHP中Q::gt方法的典型用法代碼示例。如果您正苦於以下問題:PHP Q::gt方法的具體用法?PHP Q::gt怎麽用?PHP Q::gt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Q
的用法示例。
在下文中一共展示了Q::gt方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: models_json
public function models_json()
{
usleep(500000);
$object_list = C(ChatMessage)->find_all(Q::gt('id', $this->inVars('since_id', 0)), Q::order('-id'));
echo self::models_to_jsonp(array_reverse($object_list), $this->inVars('callback', 'callback'));
exit;
}
示例2: current
public function current()
{
$this->vars('times', (int) C(BibitterCounter)->find_sum('times', Q::gt('updated', time() - 1800)));
$this->vars('interval', def('update_span', 180) * 1000);
return $this;
}
示例3: declare
<?php
declare (ticks=1);
require dirname(__FILE__) . '/__settings__.php';
import('core.Log');
import('core.Request');
Log::disable_display();
import('Chat.ChatServer');
header('application/x-javascript');
$req = new Request();
$object_list = C(ChatMessage)->find_all(Q::gt('id', $req->inVars('since_id', 0)), Q::order('-id'));
if (count($object_list) > 0) {
echo ChatServer::models_to_jsonp(array_reverse($object_list), $req->inVars('callback', 'callback'));
exit;
}
$server = new ChatServer();
pcntl_signal(SIGTERM, array(&$server, 'models_json'));
pcntl_signal(SIGHUP, array(&$server, 'models_json'));
pcntl_signal(SIGUSR1, array(&$server, 'models_json'));
sleep(def('chat@timeout'));
示例4: get_current
private function get_current()
{
return (int) C(BibitterCounter)->find_sum('times', Q::gt('updated', time() - 1800));
}