手册:MWNamespace.php

This page is a translated version of the page Manual:MWNamespace.php and the translation is 100% complete.

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

方法

  • MWNamespace::getCanonicalNamespaces( $rebuild ) - 返回带有其规范(英文)名称的所有已定义的命名空间的数组。
  • MWNamespace::getCanonicalName( $index ) - 返回指定索引的规范(英文)名称
  • MWNamespace::getValidNamespaces() - 返回wiki上存在的命名空间数组(按整数id)。 主要由帮助文档中的 api 使用。 此函数调用 getCanonicalNamespaces() 而不使用rebuild选项,排除负数命名空间,例如-1(特殊页面)。

外部链接