Go to the documentation of this file.
53 if ( !isset( self::$instances[
$domain] ) ) {
55 self::$instances[
$domain]->initFromGlobals();
58 return self::$instances[
$domain];
65 self::$instances =
array();
83 protected function register(
array $configs ) {
84 foreach ( $configs
as $config ) {
86 if ( !isset( $config[
'name'] ) ) {
87 throw new MWException(
"Cannot register a lock manager with no name." );
89 $name = $config[
'name'];
90 if ( !isset( $config[
'class'] ) ) {
91 throw new MWException(
"Cannot register lock manager `{$name}` with no class." );
93 $class = $config[
'class'];
94 unset( $config[
'class'] );
110 public function get(
$name ) {
111 if ( !isset( $this->managers[
$name] ) ) {
112 throw new MWException(
"No lock manager defined with the name `$name`." );
115 if ( !isset( $this->managers[
$name][
'instance'] ) ) {
116 $class = $this->managers[
$name][
'class'];
117 $config = $this->managers[
$name][
'config'];
118 $this->managers[
$name][
'instance'] =
new $class( $config );
121 return $this->managers[
$name][
'instance'];
132 if ( !isset( $this->managers[
$name] ) ) {
133 throw new MWException(
"No lock manager defined with the name `$name`." );
135 $class = $this->managers[
$name][
'class'];
137 return array(
'class' => $class ) + $this->managers[
$name][
'config'];
147 return isset( $this->managers[
'default'] )
148 ? $this->
get(
'default' )
160 public function getAny() {
161 return isset( $this->managers[
'default'] )
162 ? $this->
get(
'default' )
163 : $this->
get(
'fsLockManager' );
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
static destroySingletons()
Destroy the singleton instances.
static singleton( $domain=false)
getAny()
Get the default lock manager configured for the site or at least some other effective configured lock...
Simple version of LockManager that does nothing.
Class to handle file lock manager registration.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
processing should stop and the error should be shown to the user * false
$wgLockManagers[]
Initialise $wgLockManagers to include basic FS version.
wfWikiID()
Get an ASCII string identifying this wiki This is used as a prefix in memcached keys.
Allows to change the fields on the form that will be generated $name
initFromGlobals()
Register lock managers from the global variables.
config( $name)
Get the config array for a lock manager object with a given name.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
getDefault()
Get the default lock manager configured for the site.
array $managers
of (name => ('class' => ..., 'config' => ..., 'instance' => ...)) *