+ return $rxTc;
+ }
+
+ /**
+ * Capitalize a text string for a title if it belongs to a namespace that capitalizes
+ *
+ * @param $text string containing title to capitalize
+ * @param $ns int namespace index, defaults to NS_MAIN
+ * @return String containing capitalized title
+ */
+ public static function capitalize( $text, $ns = NS_MAIN ) {
+ global $wgContLang;
+
+ if ( MWNamespace::isCapitalized( $ns ) )
+ return $wgContLang->ucfirst( $text );
+ else
+ return $text;
+ }
+
+ /**
+ * Secure and split - main initialisation function for this object
+ *
+ * Assumes that mDbkeyform has been set, and is urldecoded
+ * and uses underscores, but not otherwise munged. This function
+ * removes illegal characters, splits off the interwiki and
+ * namespace prefixes, sets the other forms, and canonicalizes
+ * everything.
+ *
+ * @return \type{\bool} true on success
+ */
+ private function secureAndSplit() {
+ global $wgContLang, $wgLocalInterwiki;
+
+ # Initialisation
+ $rxTc = self::getTitleInvalidRegex();
+