MediaWiki REL1_41
|
Determine whether a site is currently in read-only mode. More...
Public Member Functions | |
__construct (ConfiguredReadOnlyMode $cro, ILBFactory $lbFactory) | |
getConfiguredReason () | |
getReason ( $domain=false) | |
Check if the site is in read-only mode and return the message if so. | |
isConfiguredReadOnly () | |
Check whether the site is configured to be in read-only mode. | |
isReadOnly ( $domain=false) | |
Check whether the site is in read-only mode. | |
setReason ( $msg) | |
Override the read-only mode, which will apply for the remainder of the request or until a service reset. | |
Determine whether a site is currently in read-only mode.
To obtain an instance, use \MediaWiki\MediaWikiServices::getReadOnlyMode().
Definition at line 12 of file ReadOnlyMode.php.
Wikimedia\Rdbms\ReadOnlyMode::__construct | ( | ConfiguredReadOnlyMode | $cro, |
ILBFactory | $lbFactory ) |
ConfiguredReadOnlyMode | $cro | |
ILBFactory | $lbFactory |
Definition at line 24 of file ReadOnlyMode.php.
Wikimedia\Rdbms\ReadOnlyMode::getConfiguredReason | ( | ) |
Definition at line 63 of file ReadOnlyMode.php.
Referenced by FileBackendGroup\__construct().
Wikimedia\Rdbms\ReadOnlyMode::getReason | ( | $domain = false | ) |
Check if the site is in read-only mode and return the message if so.
This checks both statically configured read-only mode, and (cached) whether the primary database host accepting writes.
Calling this may result in database connection.
string | false | $domain | Domain ID, or false for the current domain |
Definition at line 50 of file ReadOnlyMode.php.
Wikimedia\Rdbms\ReadOnlyMode::isConfiguredReadOnly | ( | ) |
Check whether the site is configured to be in read-only mode.
Definition at line 73 of file ReadOnlyMode.php.
Wikimedia\Rdbms\ReadOnlyMode::isReadOnly | ( | $domain = false | ) |
Check whether the site is in read-only mode.
string | false | $domain | Domain ID, or false for the current domain |
Definition at line 35 of file ReadOnlyMode.php.
Wikimedia\Rdbms\ReadOnlyMode::setReason | ( | $msg | ) |
Override the read-only mode, which will apply for the remainder of the request or until a service reset.
string | false | null | $msg |
Definition at line 83 of file ReadOnlyMode.php.