$this->mAllowLag = false;
}
- function newFromParams( $servers, $failFunction = false, $waitTimeout = 10 )
+ static function newFromParams( $servers, $failFunction = false, $waitTimeout = 10 )
{
$lb = new LoadBalancer;
$lb->initialise( $servers, $failFunction, $waitTimeout );
* Factory: creates an object representing an ID
* @static
*/
- function &get( $id ) {
+ static function &get( $id ) {
global $wgMagicWords;
if ( !is_array( $wgMagicWords ) ) {
print $outs;
}
- function setEncodings() {
+ static function setEncodings() {
global $wgInputEncoding, $wgOutputEncoding;
global $wgUser, $wgContLang;
* Get parser options
* @static
*/
- function newFromUser( &$user ) {
+ static function newFromUser( &$user ) {
$popts = new ParserOptions;
$popts->initialiseFromUser( $user );
return $popts;
* @param string $id
* @return string
*/
- function escapeId( $id ) {
+ static function escapeId( $id ) {
static $replace = array(
'%3A' => ':',
'%' => '.'
* @param string $text
* @return string
* @private
+ * @todo FIXME called from parser.php so not that much private
*/
function normalizeCharReferences( $text ) {
return preg_replace_callback(
* @param string $matches
* @return string
*/
- function normalizeCharReferencesCallback( $matches ) {
+ static function normalizeCharReferencesCallback( $matches ) {
$ret = null;
if( $matches[1] != '' ) {
$ret = Sanitizer::normalizeEntity( $matches[1] );
* @param string $name
* @return string
*/
- function normalizeEntity( $name ) {
+ static function normalizeEntity( $name ) {
global $wgHtmlEntities;
if( isset( $wgHtmlEntities[$name] ) ) {
return "&$name;";
* @param string $text
* @return string
* @public
+ * @static
*/
- function decodeCharReferences( $text ) {
+ public static function decodeCharReferences( $text ) {
return preg_replace_callback(
MW_CHAR_REFS_REGEX,
array( 'Sanitizer', 'decodeCharReferencesCallback' ),
* @param string $matches
* @return string
*/
- function decodeCharReferencesCallback( $matches ) {
+ static function decodeCharReferencesCallback( $matches ) {
if( $matches[1] != '' ) {
return Sanitizer::decodeEntity( $matches[1] );
} elseif( $matches[2] != '' ) {
* @return string
* @static
*/
- function hackDocType() {
+ static function hackDocType() {
global $wgHtmlEntities;
$out = "<!DOCTYPE html [\n";
foreach( $wgHtmlEntities as $entity => $codepoint ) {
* Use this for a special page extension
* @static
*/
- function addPage( &$obj ) {
+ static function addPage( &$obj ) {
global $wgSpecialPages;
$wgSpecialPages[$obj->mName] = $obj;
}
* Occasionally used to disable expensive or dangerous special pages
* @static
*/
- function removePage( $name ) {
+ static function removePage( $name ) {
global $wgSpecialPages;
unset( $wgSpecialPages[$name] );
}
* @static
* @param string $name
*/
- function getPage( $name ) {
+ static function getPage( $name ) {
global $wgSpecialPages;
if ( array_key_exists( $name, $wgSpecialPages ) ) {
return $wgSpecialPages[$name];
* @param string $name
* @return mixed Title object if the redirect exists, otherwise NULL
*/
- function getRedirect( $name ) {
+ static function getRedirect( $name ) {
global $wgUser;
$redirects = array(
* Returns a 2d array where the first index is the restriction name
* @static
*/
- function getPages() {
+ static function getPages() {
global $wgSpecialPages;
$pages = array(
'' => array(),
* a redirect.
* @static
*/
- function capturePath( &$title ) {
+ static function capturePath( &$title ) {
global $wgOut, $wgTitle;
$oldTitle = $wgTitle;
* @static
* @access public
*/
- function &makeTitle( $ns, $title ) {
+ public static function &makeTitle( $ns, $title ) {
$t =& new Title();
$t->mInterwiki = '';
$t->mFragment = '';
/**
* Initialise php session
+ * @static
*/
- function SetupSession() {
+ static function SetupSession() {
global $wgSessionsInMemcached, $wgCookiePath, $wgCookieDomain;
if( $wgSessionsInMemcached ) {
require_once( 'MemcachedSessions.php' );
* Create a new user object using data from session
* @static
*/
- function loadFromSession() {
+ static function loadFromSession() {
global $wgMemc, $wgDBname, $wgCookiePrefix;
if ( isset( $_SESSION['wsUserID'] ) ) {