public function getNamespaceByName( $name ) {
		$result = $this->getNamespaceResult()['query'];
		foreach ( $result['namespaces'] as $nsInfo ) {
			if ( ( !empty( $nsInfo['canonical'] ) && $nsInfo['canonical'] === $name ) ||
				$nsInfo['*'] === $name ) {
				return $this->createNamespaceFromQuery( $nsInfo, $result['namespacealiases'] );
			}
		}
		foreach ( $result['namespacealiases'] as $alias ) {
			if ( $alias['*'] === $name && !empty( $result['namespaces'][$alias['id']] ) ) {
				return $this->createNamespaceFromQuery(
					$result['namespaces'][$alias['id']],
					$result['namespacealiases']
				);
			}
		}
		return null;
	}
public function getNamespaceByName( $name ) {
		$result = $this->getNamespaceResult()['query'];
		foreach ( $result['namespaces'] as $nsInfo ) {
			if ( ( !empty( $nsInfo['canonical'] ) && $nsInfo['canonical'] === $name ) ||
				$nsInfo['*'] === $name ) {
				return $this->createNamespaceFromQuery( $nsInfo, $result['namespacealiases'] );
			}
		}
		foreach ( $result['namespacealiases'] as $alias ) {
			if ( $alias['*'] === $name && !empty( $result['namespaces'][$alias['id']] ) ) {
				return $this->createNamespaceFromQuery(
					$result['namespaces'][$alias['id']],
					$result['namespacealiases']
				);
			}
		}
		return null;
	}
public function getNamespaceByName ( $ name ) { $ result = $ this -> getNamespaceResult ( ) [ 'query' ] ; foreach ( $ result [ 'namespaces' ] as $ nsInfo ) { if ( ( ! empty ( $ nsInfo [ 'canonical' ] ) && $ nsInfo [ 'canonical' ] === $ name ) || $ nsInfo [ '*' ] === $ name ) { return $ this -> createNamespaceFromQuery ( $ nsInfo , $ result [ 'namespacealiases' ] ) ; } } foreach ( $ result [ 'namespacealiases' ] as $ alias ) { if ( $ alias [ '*' ] === $ name && ! empty ( $ result [ 'namespaces' ] [ $ alias [ 'id' ] ] ) ) { return $ this -> createNamespaceFromQuery ( $ result [ 'namespaces' ] [ $ alias [ 'id' ] ] , $ result [ 'namespacealiases' ] ) ; } } return null ; }
Find a namespace by its canonical name, local name or namespace alias

@param string $name
@return NamespaceInfo|null
Find a namespace by its canonical name local name or namespace alias