MediaWiki REL1_30
|
A read-only mode service which does not depend on LoadBalancer. More...
Public Member Functions | |
__construct (Config $config) | |
clearCache () | |
Clear the cache of the read only file. | |
getReason () | |
Get the value of $wgReadOnly or the contents of $wgReadOnlyFile. | |
isReadOnly () | |
Check whether the wiki is in read-only mode. | |
setReason ( $msg) | |
Set the read-only mode, which will apply for the remainder of the request or until a service reset. | |
Private Attributes | |
Config | $config |
string bool null | $fileReason |
string null | $overrideReason |
A read-only mode service which does not depend on LoadBalancer.
To obtain an instance, use MediaWikiServices::getConfiguredReadOnlyMode().
Definition at line 9 of file ConfiguredReadOnlyMode.php.
ConfiguredReadOnlyMode::__construct | ( | Config | $config | ) |
Definition at line 19 of file ConfiguredReadOnlyMode.php.
References $config.
ConfiguredReadOnlyMode::clearCache | ( | ) |
Clear the cache of the read only file.
Definition at line 70 of file ConfiguredReadOnlyMode.php.
ConfiguredReadOnlyMode::getReason | ( | ) |
Get the value of $wgReadOnly or the contents of $wgReadOnlyFile.
Definition at line 37 of file ConfiguredReadOnlyMode.php.
References $fileReason, and $overrideReason.
Referenced by MWLBFactory\applyDefaultConfig(), and isReadOnly().
ConfiguredReadOnlyMode::isReadOnly | ( | ) |
Check whether the wiki is in read-only mode.
Definition at line 28 of file ConfiguredReadOnlyMode.php.
References getReason().
ConfiguredReadOnlyMode::setReason | ( | $msg | ) |
Set the read-only mode, which will apply for the remainder of the request or until a service reset.
string | null | $msg |
Definition at line 63 of file ConfiguredReadOnlyMode.php.
|
private |
Definition at line 11 of file ConfiguredReadOnlyMode.php.
Referenced by __construct().
|
private |
Definition at line 14 of file ConfiguredReadOnlyMode.php.
Referenced by getReason().
|
private |
Definition at line 17 of file ConfiguredReadOnlyMode.php.
Referenced by getReason().