MaintenanceConfig
in package
Configuration handler for maintenance mode.
Table of Contents
Properties
- $_config : array<string|int, mixed>
- $_settingSource : ISettingSource|null
Methods
- __construct() : mixed
- fromSettings() : self
- Create MaintenanceConfig from settings source
- getAllowedIps() : array<string|int, mixed>
- Get allowed IP addresses from configuration
- getCustomView() : string|null
- Get custom maintenance view path
- getDefaultMessage() : string
- Get default maintenance message
- getRetryAfter() : int
- Get default retry-after value
- isEnabled() : bool
- Check if maintenance mode is enabled in configuration
- shouldShowCountdown() : bool
- Check if countdown should be shown
- getDefaults() : array<string|int, mixed>
- Get default configuration
- loadConfig() : void
- Load configuration from settings source
Properties
$_config
private
array<string|int, mixed>
$_config
= []
$_settingSource
private
ISettingSource|null
$_settingSource
Methods
__construct()
public
__construct([ISettingSource|null $settingSource = null ]) : mixed
Parameters
- $settingSource : ISettingSource|null = null
fromSettings()
Create MaintenanceConfig from settings source
public
static fromSettings(ISettingSource $source) : self
Parameters
- $source : ISettingSource
Return values
selfgetAllowedIps()
Get allowed IP addresses from configuration
public
getAllowedIps() : array<string|int, mixed>
Return values
array<string|int, mixed>getCustomView()
Get custom maintenance view path
public
getCustomView() : string|null
Return values
string|nullgetDefaultMessage()
Get default maintenance message
public
getDefaultMessage() : string
Return values
stringgetRetryAfter()
Get default retry-after value
public
getRetryAfter() : int
Return values
intisEnabled()
Check if maintenance mode is enabled in configuration
public
isEnabled() : bool
Return values
boolshouldShowCountdown()
Check if countdown should be shown
public
shouldShowCountdown() : bool
Return values
boolgetDefaults()
Get default configuration
private
getDefaults() : array<string|int, mixed>
Return values
array<string|int, mixed>loadConfig()
Load configuration from settings source
private
loadConfig() : void