手册:MWNamespace.php

From mediawiki.org
This page is a translated version of the page Manual:MWNamespace.php and the translation is 56% complete.
Outdated translations are marked like this.

MWNamespace.php包含MWNamespace类,仅包含一个用于处理命名空间的静态函数的实用类,编码了基于索引的所有命名空间的“魔法”行为。

方法

  • MWNamespace::getCanonicalNamespaces( $rebuild ) - 返回带有其规范(英文)名称的所有已定义的命名空间的数组。
  • MWNamespace::getCanonicalName( $index ) - 返回指定索引的规范(英文)名称
  • MWNamespace::getValidNamespaces() - 返回wiki上存在的命名空间数组(按整数id)。主要由帮助文档中的 api 使用。此函数调用 getCanonicalNamespaces() 而不使用rebuil选项,然后排除负数命名空间,例如-1(特殊页面)。 Used primarily by the api in help documentation. This function calls getCanonicalNamespaces() without using the rebuild option and it then excludes the negative number namespaces, e.g. -1 (special page).

External links