當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WebRequest::getLimitOffset方法代碼示例

本文整理匯總了PHP中WebRequest::getLimitOffset方法的典型用法代碼示例。如果您正苦於以下問題:PHP WebRequest::getLimitOffset方法的具體用法?PHP WebRequest::getLimitOffset怎麽用?PHP WebRequest::getLimitOffset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WebRequest的用法示例。


在下文中一共展示了WebRequest::getLimitOffset方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: SpecialSearch

 /**
  * Set up basic search parameters from the request and user settings.
  * Typically you'll pass $wgRequest and $wgUser.
  *
  * @param WebRequest $request
  * @param User $user
  * @access public
  */
 function SpecialSearch(&$request, &$user)
 {
     list($this->limit, $this->offset) = $request->getLimitOffset(20, 'searchlimit');
     if ($request->getCheck('searchx')) {
         $this->namespaces = $this->powerSearch($request);
     } else {
         $this->namespaces = $this->userNamespaces($user);
     }
     $this->searchRedirects = false;
 }
開發者ID:BackupTheBerlios,項目名稱:blahtex,代碼行數:18,代碼來源:SpecialSearch.php

示例2: setupQuery

 /**
  * Basic setup and applies the limiting factors from the WebRequest object.
  * @param WebRequest $request
  * @private
  */
 function setupQuery($request)
 {
     $page = $this->db->tableName('page');
     $user = $this->db->tableName('user');
     $this->joinClauses = array("LEFT OUTER JOIN {$page} ON log_namespace=page_namespace AND log_title=page_title");
     $this->whereClauses = array('user_id=log_user');
     $this->limitType($request->getVal('type'));
     $this->limitUser($request->getText('user'));
     $this->limitTitle($request->getText('page'));
     $this->limitTime($request->getVal('from'), '>=');
     $this->limitTime($request->getVal('until'), '<=');
     list($this->limit, $this->offset) = $request->getLimitOffset();
 }
開發者ID:BackupTheBerlios,項目名稱:openzaurus-svn,代碼行數:18,代碼來源:SpecialLog.php

示例3: list

 /**
  * Set up basic search parameters from the request and user settings.
  * Typically you'll pass $wgRequest and $wgUser.
  *
  * @param WebRequest $request
  * @param User $user
  * @public
  */
 function __construct(&$request, &$user)
 {
     list($this->limit, $this->offset) = $request->getLimitOffset(20, 'searchlimit');
     $this->mPrefix = $request->getVal('prefix', '');
     # Extract requested namespaces
     $this->namespaces = $this->powerSearch($request);
     if (empty($this->namespaces)) {
         $this->namespaces = SearchEngine::userNamespaces($user);
     }
     $this->searchRedirects = $request->getcheck('redirs') ? true : false;
     $this->searchAdvanced = $request->getVal('advanced');
     $this->active = 'advanced';
     $this->sk = $user->getSkin();
     $this->didYouMeanHtml = '';
     # html of did you mean... link
     $this->fulltext = $request->getVal('fulltext');
 }
開發者ID:BackupTheBerlios,項目名稱:swahili-dict,代碼行數:25,代碼來源:SpecialSearch.php

示例4: setupQuery

 /**
  * Basic setup and applies the limiting factors from the WebRequest object.
  * @param WebRequest $request
  * @private
  */
 function setupQuery($request)
 {
     $page = $this->db->tableName('page');
     $user = $this->db->tableName('user');
     $this->joinClauses = array("LEFT OUTER JOIN {$page} ON log_namespace=page_namespace AND log_title=page_title", "INNER JOIN {$user} ON user_id=log_user");
     $this->whereClauses = array();
     $this->limitType($request->getVal('type'));
     $this->limitUser($request->getText('user'));
     $this->limitTitle($request->getText('page'), $request->getBool('pattern'));
     $this->limitTime($request->getVal('from'), '>=');
     $this->limitTime($request->getVal('until'), '<=');
     list($this->limit, $this->offset) = $request->getLimitOffset();
     // XXX This all needs to use Pager, ugly hack for now.
     global $wgMiserMode;
     if ($wgMiserMode) {
         $this->offset = min($this->offset, 10000);
     }
 }
開發者ID:Jobava,項目名稱:diacritice-meta-repo,代碼行數:23,代碼來源:SpecialLog.php

示例5: list

 /**
  * Set up basic search parameters from the request and user settings.
  * Typically you'll pass $wgRequest and $wgUser.
  *
  * @param WebRequest $request
  * @param User $user
  * @public
  */
 function __construct(&$request, &$user)
 {
     list($this->limit, $this->offset) = $request->getLimitOffset(20, 'searchlimit');
     $this->mPrefix = $request->getVal('prefix', '');
     $this->namespaces = $this->powerSearch($request);
     if (empty($this->namespaces)) {
         $this->namespaces = SearchEngine::userNamespaces($user);
     }
     $this->searchRedirects = $request->getcheck('redirs') ? true : false;
 }
開發者ID:amjadtbssm,項目名稱:website,代碼行數:18,代碼來源:SpecialSearch.php


注:本文中的WebRequest::getLimitOffset方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。