MediaWiki
1.34.0
|
A read-only mode service which does not depend on LoadBalancer. More...
Public Member Functions | |
__construct ( $reason, $reasonFile=null) | |
getReason () | |
Get the value of $wgReadOnly or the contents of $wgReadOnlyFile. More... | |
isReadOnly () | |
Check whether the wiki is in read-only mode. More... | |
setReason ( $msg) | |
Set the read-only mode, which will apply for the remainder of the request or until a service reset. More... | |
Private Attributes | |
string boolean null | $reason |
string null | $reasonFile |
A read-only mode service which does not depend on LoadBalancer.
To obtain an instance, use MediaWikiServices::getInstance()->getConfiguredReadOnlyMode().
Definition at line 9 of file ConfiguredReadOnlyMode.php.
ConfiguredReadOnlyMode::__construct | ( | $reason, | |
$reasonFile = null |
|||
) |
string | bool | null | $reason | Current reason for read-only mode, if known. null means look in $reasonFile instead. |
string | null | $reasonFile | A file to look in for a reason, if $reason is null. If it exists and is non-empty, its contents are treated as the reason for read-only mode. Otherwise, the wiki is not read-only. |
Definition at line 23 of file ConfiguredReadOnlyMode.php.
References $reason, $reasonFile, and wfDeprecated().
ConfiguredReadOnlyMode::getReason | ( | ) |
Get the value of $wgReadOnly or the contents of $wgReadOnlyFile.
Definition at line 48 of file ConfiguredReadOnlyMode.php.
References $reason.
Referenced by MWLBFactory\applyDefaultConfig(), and isReadOnly().
ConfiguredReadOnlyMode::isReadOnly | ( | ) |
Check whether the wiki is in read-only mode.
Definition at line 39 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 70 of file ConfiguredReadOnlyMode.php.
|
private |
Definition at line 11 of file ConfiguredReadOnlyMode.php.
Referenced by __construct(), and getReason().
|
private |
Definition at line 14 of file ConfiguredReadOnlyMode.php.
Referenced by __construct().