public static $canonicalNames = [
NS_MEDIA => 'Media',
NS_SPECIAL => 'Special',
+ NS_MAIN => '',
NS_TALK => 'Talk',
NS_USER => 'User',
NS_USER_TALK => 'User_talk',
* Returns array of all defined namespaces with their canonical
* (English) names.
*
- * @return array
+ * @return string[]
*/
public function getCanonicalNamespaces() {
if ( $this->canonicalNamespaces === null ) {
*/
public function getValidNamespaces() {
if ( is_null( $this->validNamespaces ) ) {
+ $this->validNamespaces = [];
foreach ( array_keys( $this->getCanonicalNamespaces() ) as $ns ) {
if ( $ns >= 0 ) {
$this->validNamespaces[] = $ns;