|
MediaWiki master
|
Determine whether a site is statically configured as read-only. More...
Public Member Functions | |
| __construct ( $reason, ?string $reasonFile=null) | |
| getReason () | |
| isReadOnly () | |
| Check whether the site 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. | |
Determine whether a site is statically configured as read-only.
Unlike ReadOnlyMode, this only checks site configuration. It does not confirm whether the primary database host actively accepts writes.
Definition at line 13 of file ConfiguredReadOnlyMode.php.
| Wikimedia\Rdbms\ConfiguredReadOnlyMode::__construct | ( | $reason, | |
| ?string | $reasonFile = null ) |
| string | false | 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 site is not read-only. |
Definition at line 27 of file ConfiguredReadOnlyMode.php.
| Wikimedia\Rdbms\ConfiguredReadOnlyMode::getReason | ( | ) |
Definition at line 42 of file ConfiguredReadOnlyMode.php.
| Wikimedia\Rdbms\ConfiguredReadOnlyMode::isReadOnly | ( | ) |
Check whether the site is in read-only mode.
Definition at line 35 of file ConfiguredReadOnlyMode.php.
| Wikimedia\Rdbms\ConfiguredReadOnlyMode::setReason | ( | $msg | ) |
Set 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 64 of file ConfiguredReadOnlyMode.php.