Go to the documentation of this file.
19 $this->configuredReadOnly = $cro;
41 $reason = $this->configuredReadOnly->getReason();
42 if ( $reason !==
false ) {
45 $reason = $this->loadBalancer->getReadOnlyReason();
46 if ( $reason !==
false && $reason !==
null ) {
59 $this->configuredReadOnly->setReason( $msg );
isReadOnly()
Check whether the wiki is in read-only mode.
__construct(ConfiguredReadOnlyMode $cro, ILoadBalancer $loadBalancer)
A service class for fetching the wiki's current read-only mode.
setReason( $msg)
Set the read-only mode, which will apply for the remainder of the request or until a service reset.
getReason()
Check if the site is in read-only mode and return the message if so.
ConfiguredReadOnlyMode $configuredReadOnly
ILoadBalancer $loadBalancer