本文整理汇总了PHP中QueryPage类的典型用法代码示例。如果您正苦于以下问题:PHP QueryPage类的具体用法?PHP QueryPage怎么用?PHP QueryPage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了QueryPage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Initialize all query page objects
*/
function __construct()
{
parent::__construct();
foreach (QueryPage::getPages() as $page) {
$class = $page[0];
if (!in_array($class, $this->manualTest)) {
$this->queryPages[$class] = new $class();
}
}
}
示例2: __construct
public function __construct(ApiQuery $query, $moduleName)
{
parent::__construct($query, $moduleName, 'qp');
// Build mapping from special page names to QueryPage classes
$uselessQueryPages = $this->getConfig()->get('APIUselessQueryPages');
$this->qpMap = array();
foreach (QueryPage::getPages() as $page) {
if (!in_array($page[1], $uselessQueryPages)) {
$this->qpMap[$page[1]] = $page[0];
}
}
}
示例3: __construct
public function __construct($mode)
{
if ($this instanceof SpecialPage) {
parent::__construct('ApprovedRevs');
}
$this->mMode = $mode;
}
示例4: list
function __construct($name = 'Newcontributors')
{
parent::__construct($name);
list($limit, $offset) = wfCheckLimits();
$this->limit = $limit;
$this->offset = $offset;
}
示例5:
function __construct($name = 'Filters')
{
// Backwards compatibility for pre-version 1.18.
if ($this instanceof SpecialPage) {
parent::__construct($name);
}
}
示例6: __construct
public function __construct($name = 'Forms')
{
// For MW 1.17
if ($this instanceof SpecialPage) {
parent::__construct($name);
}
}
示例7: __construct
public function __construct($mode)
{
if ($this instanceof SpecialPage) {
parent::__construct($this->specialpage);
}
$this->mMode = $mode;
}
示例8:
function __construct($name = 'MediaStatistics')
{
parent::__construct($name);
// Generally speaking there is only a small number of file types,
// so just show all of them.
$this->limit = 5000;
$this->shownavigation = false;
}
示例9: reallyDoQuery
function reallyDoQuery($limit, $offset = false)
{
if ($this->suppressSqlOffset) {
// Bug #27678: Do not use offset here, because it was already used in
// search perfomed by execute method
return parent::reallyDoQuery($limit, false);
} else {
return parent::reallyDoQuery($limit, $offset);
}
}
示例10: feedItemDesc
function feedItemDesc($row)
{
if (isset($row->rev_id)) {
$revision = Revision::newFromId($row->rev_id);
if ($revision) {
return '<p>' . htmlspecialchars(wfMsg('summary')) . ': ' . $text . "</p>\n<hr />\n<div>" . nl2br(htmlspecialchars($revision->getText())) . "</div>";
}
}
return parent::feedItemDesc($row);
}
示例11: execute
function execute($par)
{
$mime = $par ? $par : $this->getRequest()->getText('mime');
$this->setHeaders();
$this->outputHeader();
$this->getOutput()->addHTML(Xml::openElement('form', array('id' => 'specialmimesearch', 'method' => 'get', 'action' => SpecialPage::getTitleFor('MIMEsearch')->getLocalUrl())) . Xml::openElement('fieldset') . Html::hidden('title', SpecialPage::getTitleFor('MIMEsearch')->getPrefixedText()) . Xml::element('legend', null, wfMsg('mimesearch')) . Xml::inputLabel(wfMsg('mimetype'), 'mime', 'mime', 20, $mime) . ' ' . Xml::submitButton(wfMsg('ilsubmit')) . Xml::closeElement('fieldset') . Xml::closeElement('form'));
list($this->major, $this->minor) = File::splitMime($mime);
if ($this->major == '' || $this->minor == '' || $this->minor == 'unknown' || !self::isValidType($this->major)) {
return;
}
parent::execute($par);
}
示例12:
function __construct($name = 'Mostinterwikis')
{
parent::__construct($name);
}
示例13: __construct
public function __construct($name = 'Templates')
{
parent::__construct($name);
}
示例14:
function __construct($name = 'Unwatchedpages')
{
parent::__construct($name, 'unwatchedpages');
}
示例15: execute
public function execute($par)
{
$this->mime = $par ? $par : $this->getRequest()->getText('mime');
$this->mime = trim($this->mime);
list($this->major, $this->minor) = File::splitMime($this->mime);
if ($this->major == '' || $this->minor == '' || $this->minor == 'unknown' || !self::isValidType($this->major)) {
$this->setHeaders();
$this->outputHeader();
$this->getPageHeader();
return;
}
parent::execute($par);
}