当前位置: 首页>>代码示例>>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;未经允许,请勿转载。