当前位置: 首页>>代码示例>>PHP>>正文


PHP ApiQueryGeneratorBase::__construct方法代码示例

本文整理汇总了PHP中ApiQueryGeneratorBase::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ApiQueryGeneratorBase::__construct方法的具体用法?PHP ApiQueryGeneratorBase::__construct怎么用?PHP ApiQueryGeneratorBase::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ApiQueryGeneratorBase的用法示例。


在下文中一共展示了ApiQueryGeneratorBase::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($query, $moduleName)
 {
     switch ($moduleName) {
         case 'alllinks':
             $prefix = 'al';
             $this->table = 'pagelinks';
             $this->tablePrefix = 'pl_';
             $this->dfltNamespace = NS_MAIN;
             $this->indexTag = 'l';
             $this->description = 'Enumerate all links that point to a given namespace';
             $this->descriptionLink = 'link';
             $this->descriptionLinked = 'linked';
             $this->descriptionLinking = 'linking';
             break;
         case 'alltransclusions':
             $prefix = 'at';
             $this->table = 'templatelinks';
             $this->tablePrefix = 'tl_';
             $this->dfltNamespace = NS_TEMPLATE;
             $this->indexTag = 't';
             $this->description = 'List all transclusions (pages embedded using {{x}}), including non-existing';
             $this->descriptionLink = 'transclusion';
             $this->descriptionLinked = 'transcluded';
             $this->descriptionLinking = 'transcluding';
             break;
         default:
             ApiBase::dieDebug(__METHOD__, 'Unknown module name');
     }
     parent::__construct($query, $moduleName, $prefix);
 }
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:30,代码来源:ApiQueryAllLinks.php

示例2: __construct

	public function __construct( $query, $moduleName ) {
		$settings = $this->backlinksSettings[$moduleName];
		$prefix = $settings['prefix'];
		$code = $settings['code'];
		$this->resultArr = array();

		parent::__construct( $query, $moduleName, $code );
		$this->bl_ns = $prefix . '_namespace';
		$this->bl_from = $prefix . '_from';
		$this->bl_table = $settings['linktbl'];
		$this->bl_code = $code;
		$this->helpUrl = $settings['helpurl'];

		$this->hasNS = $moduleName !== 'imageusage';
		if ( $this->hasNS ) {
			$this->bl_title = $prefix . '_title';
			$this->bl_fields = array(
				$this->bl_ns,
				$this->bl_title
			);
		} else {
			$this->bl_title = $prefix . '_to';
			$this->bl_fields = array(
				$this->bl_title
			);
		}
	}
开发者ID:nahoj,项目名称:mediawiki_ynh,代码行数:27,代码来源:ApiQueryBacklinks.php

示例3: __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];
         }
     }
 }
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:12,代码来源:ApiQueryQueryPage.php

示例4: __construct

 public function __construct($query, $moduleName)
 {
     parent::__construct($query, $moduleName, 'qp');
     // We need to do this to make sure $wgQueryPages is set up
     // This SUCKS
     global $IP;
     require_once "{$IP}/includes/QueryPage.php";
     // Build mapping from special page names to QueryPage classes
     global $wgQueryPages;
     $this->qpMap = array();
     foreach ($wgQueryPages as $page) {
         if (!in_array($page[1], $this->uselessQueryPages)) {
             $this->qpMap[$page[1]] = $page[0];
         }
     }
 }
开发者ID:seedbank,项目名称:old-repo,代码行数:16,代码来源:ApiQueryQueryPage.php

示例5: __construct

 public function __construct($query, $moduleName)
 {
     switch ($moduleName) {
         case self::LINKS:
             $this->table = 'pagelinks';
             $this->prefix = 'pl';
             $this->description = 'link';
             break;
         case self::TEMPLATES:
             $this->table = 'templatelinks';
             $this->prefix = 'tl';
             $this->description = 'template';
             break;
         default:
             ApiBase::dieDebug(__METHOD__, 'Unknown module name');
     }
     parent::__construct($query, $moduleName, $this->prefix);
 }
开发者ID:josephdye,项目名称:wikireader,代码行数:18,代码来源:ApiQueryLinks.php

示例6: __construct

 public function __construct($query, $moduleName)
 {
     extract($this->backlinksSettings[$moduleName]);
     parent::__construct($query, $moduleName, $code);
     $this->bl_ns = $prefix . '_namespace';
     $this->bl_from = $prefix . '_from';
     $this->bl_table = $linktbl;
     $this->bl_code = $code;
     $this->hasNS = $moduleName !== 'imageusage';
     if ($this->hasNS) {
         $this->bl_title = $prefix . '_title';
         $this->bl_sort = "{$this->bl_ns}, {$this->bl_title}, {$this->bl_from}";
         $this->bl_fields = array($this->bl_ns, $this->bl_title);
     } else {
         $this->bl_title = $prefix . '_to';
         $this->bl_sort = "{$this->bl_title}, {$this->bl_from}";
         $this->bl_fields = array($this->bl_title);
     }
 }
开发者ID:amjadtbssm,项目名称:website,代码行数:19,代码来源:ApiQueryBacklinks.php

示例7: __construct

 public function __construct(ApiQuery $query, $moduleName)
 {
     switch ($moduleName) {
         case self::LINKS:
             $this->table = 'pagelinks';
             $this->prefix = 'pl';
             $this->titlesParam = 'titles';
             $this->helpUrl = 'https://www.mediawiki.org/wiki/API:Links';
             break;
         case self::TEMPLATES:
             $this->table = 'templatelinks';
             $this->prefix = 'tl';
             $this->titlesParam = 'templates';
             $this->helpUrl = 'https://www.mediawiki.org/wiki/API:Templates';
             break;
         default:
             ApiBase::dieDebug(__METHOD__, 'Unknown module name');
     }
     parent::__construct($query, $moduleName, $this->prefix);
 }
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:20,代码来源:ApiQueryLinks.php

示例8: __construct

 public function __construct($query, $moduleName)
 {
     $code = $prefix = $linktbl = null;
     extract($this->backlinksSettings[$moduleName]);
     parent::__construct($query, $moduleName, $code);
     $this->bl_ns = $prefix . '_namespace';
     $this->bl_from = $prefix . '_from';
     $this->bl_tables = array($linktbl, 'page');
     $this->bl_code = $code;
     $this->hasNS = $moduleName !== 'imageusage';
     if ($this->hasNS) {
         $this->bl_title = $prefix . '_title';
         global $wgRequest;
         $this->bl_sort = $wgRequest->getVal('revsort') == 1 ? "tl_from desc" : "{$this->bl_ns}, {$this->bl_title}, {$this->bl_from}";
         $this->bl_fields = array($this->bl_ns, $this->bl_title);
     } else {
         $this->bl_title = $prefix . '_to';
         $this->bl_sort = "{$this->bl_title}, {$this->bl_from}";
         $this->bl_fields = array($this->bl_title);
     }
 }
开发者ID:ErdemA,项目名称:wikihow,代码行数:21,代码来源:ApiQueryBacklinks.php

示例9: __construct

 public function __construct(ApiQuery $query, $moduleName)
 {
     switch ($moduleName) {
         case 'alllinks':
             $prefix = 'al';
             $this->table = 'pagelinks';
             $this->tablePrefix = 'pl_';
             $this->useIndex = 'pl_namespace';
             $this->indexTag = 'l';
             break;
         case 'alltransclusions':
             $prefix = 'at';
             $this->table = 'templatelinks';
             $this->tablePrefix = 'tl_';
             $this->dfltNamespace = NS_TEMPLATE;
             $this->useIndex = 'tl_namespace';
             $this->indexTag = 't';
             break;
         case 'allfileusages':
             $prefix = 'af';
             $this->table = 'imagelinks';
             $this->tablePrefix = 'il_';
             $this->fieldTitle = 'to';
             $this->dfltNamespace = NS_FILE;
             $this->hasNamespace = false;
             $this->indexTag = 'f';
             break;
         case 'allredirects':
             $prefix = 'ar';
             $this->table = 'redirect';
             $this->tablePrefix = 'rd_';
             $this->indexTag = 'r';
             $this->props = array('fragment' => 'rd_fragment', 'interwiki' => 'rd_interwiki');
             break;
         default:
             ApiBase::dieDebug(__METHOD__, 'Unknown module name');
     }
     parent::__construct($query, $moduleName, $prefix);
 }
开发者ID:eliagbayani,项目名称:LiteratureEditor,代码行数:39,代码来源:ApiQueryAllLinks.php

示例10: __construct

 public function __construct(ApiQuery $query, $moduleName)
 {
     switch ($moduleName) {
         case self::LINKS:
             $this->table = 'pagelinks';
             $this->prefix = 'pl';
             $this->description = 'link';
             $this->titlesParam = 'titles';
             $this->titlesParamDescription = 'Only list links to these titles. Useful ' . 'for checking whether a certain page links to a certain title.';
             $this->helpUrl = 'https://www.mediawiki.org/wiki/API:Properties#links_.2F_pl';
             break;
         case self::TEMPLATES:
             $this->table = 'templatelinks';
             $this->prefix = 'tl';
             $this->description = 'template';
             $this->titlesParam = 'templates';
             $this->titlesParamDescription = 'Only list these templates. Useful ' . 'for checking whether a certain page uses a certain template.';
             $this->helpUrl = 'https://www.mediawiki.org/wiki/API:Properties#templates_.2F_tl';
             break;
         default:
             ApiBase::dieDebug(__METHOD__, 'Unknown module name');
     }
     parent::__construct($query, $moduleName, $this->prefix);
 }
开发者ID:whysasse,项目名称:kmwiki,代码行数:24,代码来源:ApiQueryLinks.php

示例11: __construct

 public function __construct(ApiQuery $query, $moduleName)
 {
     parent::__construct($query, $moduleName, 'ai');
     $this->mRepo = RepoGroup::singleton()->getLocalRepo();
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:5,代码来源:ApiQueryAllImages.php

示例12: __construct

 public function __construct(ApiQuery $query, $moduleName)
 {
     parent::__construct($query, $moduleName, self::$settings[$moduleName]['code']);
 }
开发者ID:whysasse,项目名称:kmwiki,代码行数:4,代码来源:ApiQueryBacklinksprop.php

示例13: __construct

 public function __construct($query, $moduleName)
 {
     // Keep the prefix compatible with list=search
     parent::__construct($query, $moduleName, 'sr');
 }
开发者ID:ErdemA,项目名称:wikihow,代码行数:5,代码来源:ApiQueryLuceneSearch.php

示例14: __construct

 public function __construct(ApiQuery $query, $moduleName)
 {
     switch ($moduleName) {
         case 'alllinks':
             $prefix = 'al';
             $this->table = 'pagelinks';
             $this->tablePrefix = 'pl_';
             $this->useIndex = 'pl_namespace';
             $this->indexTag = 'l';
             $this->description = 'Enumerate all links that point to a given namespace';
             $this->descriptionWhat = 'link';
             $this->descriptionTargets = 'linked titles';
             $this->descriptionLinking = 'linking';
             break;
         case 'alltransclusions':
             $prefix = 'at';
             $this->table = 'templatelinks';
             $this->tablePrefix = 'tl_';
             $this->dfltNamespace = NS_TEMPLATE;
             $this->useIndex = 'tl_namespace';
             $this->indexTag = 't';
             $this->description = 'List all transclusions (pages embedded using {{x}}), including non-existing';
             $this->descriptionWhat = 'transclusion';
             $this->descriptionTargets = 'transcluded titles';
             $this->descriptionLinking = 'transcluding';
             break;
         case 'allfileusages':
             $prefix = 'af';
             $this->table = 'imagelinks';
             $this->tablePrefix = 'il_';
             $this->fieldTitle = 'to';
             $this->dfltNamespace = NS_FILE;
             $this->hasNamespace = false;
             $this->indexTag = 'f';
             $this->description = 'List all file usages, including non-existing';
             $this->descriptionWhat = 'file';
             $this->descriptionTargets = 'file titles';
             $this->descriptionLinking = 'using';
             break;
         case 'allredirects':
             $prefix = 'ar';
             $this->table = 'redirect';
             $this->tablePrefix = 'rd_';
             $this->indexTag = 'r';
             $this->description = 'List all redirects to a namespace';
             $this->descriptionWhat = 'redirect';
             $this->descriptionTargets = 'target pages';
             $this->descriptionLinking = 'redirecting';
             $this->props = array('fragment' => 'rd_fragment', 'interwiki' => 'rd_interwiki');
             $this->propHelp = array(' fragment - Adds the fragment from the redirect, if any', ' interwiki - Adds the interwiki prefix from the redirect, if any');
             break;
         default:
             ApiBase::dieDebug(__METHOD__, 'Unknown module name');
     }
     parent::__construct($query, $moduleName, $prefix);
 }
开发者ID:whysasse,项目名称:kmwiki,代码行数:56,代码来源:ApiQueryAllLinks.php

示例15: __construct

 public function __construct(ApiQuery $query, $moduleName)
 {
     parent::__construct($query, $moduleName, 'pt');
 }
开发者ID:D66Ha,项目名称:mediawiki,代码行数:4,代码来源:ApiQueryProtectedTitles.php


注:本文中的ApiQueryGeneratorBase::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。