MediaWiki REL1_32
|
A service class for fetching the wiki's current read-only mode. More...
Public Member Functions | |
__construct (ConfiguredReadOnlyMode $cro, LoadBalancer $loadBalancer) | |
clearCache () | |
Clear the cache of the read only file. | |
getReason () | |
Check if the site is in read-only mode and return the message if so. | |
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 | |
ConfiguredReadOnlyMode | $configuredReadOnly |
LoadBalancer | $loadBalancer |
A service class for fetching the wiki's current read-only mode.
To obtain an instance, use MediaWikiServices::getReadOnlyMode().
Definition at line 11 of file ReadOnlyMode.php.
ReadOnlyMode::__construct | ( | ConfiguredReadOnlyMode | $cro, |
LoadBalancer | $loadBalancer | ||
) |
Definition at line 18 of file ReadOnlyMode.php.
References $loadBalancer.
ReadOnlyMode::clearCache | ( | ) |
Clear the cache of the read only file.
Definition at line 65 of file ReadOnlyMode.php.
ReadOnlyMode::getReason | ( | ) |
Check if the site is in read-only mode and return the message if so.
This checks the configuration and registered DB load balancers for read-only mode. This may result in DB connection being made.
Definition at line 40 of file ReadOnlyMode.php.
Referenced by isReadOnly().
ReadOnlyMode::isReadOnly | ( | ) |
Check whether the wiki is in read-only mode.
Definition at line 28 of file ReadOnlyMode.php.
References getReason().
ReadOnlyMode::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 58 of file ReadOnlyMode.php.
|
private |
Definition at line 13 of file ReadOnlyMode.php.
|
private |
Definition at line 16 of file ReadOnlyMode.php.
Referenced by __construct().