2 # This is a utility class with only static functions
3 # for dealing with namespaces that encodes all the
4 # "magic" behaviors of them based on index. The textual
5 # names of the namespaces are handled by Language.php.
9 function getSpecial() { return -1; }
10 function getUser() { return 2; }
11 function getWikipedia() { return 4; }
12 function getImage() { return 6; }
14 function isMovable( $index )
16 if ( $index < 0 ||
$index > 5 ) { return false; }
20 function isTalk( $index )
22 if ( 1 == $index ||
3 == $index ||
5 == $index ||
7 == $index ) {
28 # Get the talk namespace corresponding to the given index
30 function getTalk( $index )
32 if ( Namespace::isTalk( $index ) ) {
39 function getSubject( $index )
41 if ( Namespace::isTalk( $index ) ) {