Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (Filesystem $filesystem) | |
isOn ($remoteAddr='') | |
set ($isOn) | |
setAddresses ($addresses) | |
getAddressInfo () | |
Data Fields | |
const | FLAG_FILENAME = '.maintenance.flag' |
const | IP_FILENAME = '.maintenance.ip' |
const | FLAG_DIR = DirectoryList::VAR_DIR |
Protected Attributes | |
$flagDir | |
Application Maintenance Mode
Definition at line 14 of file MaintenanceMode.php.
__construct | ( | Filesystem | $filesystem | ) |
Constructor
\Magento\Framework\Filesystem | $filesystem |
Definition at line 46 of file MaintenanceMode.php.
getAddressInfo | ( | ) |
Get list of IP addresses effective for maintenance mode
Definition at line 113 of file MaintenanceMode.php.
isOn | ( | $remoteAddr = '' | ) |
Checks whether mode is on
Optionally specify an IP-address to compare against the white list
string | $remoteAddr |
Definition at line 59 of file MaintenanceMode.php.
set | ( | $isOn | ) |
Sets maintenance mode "on" or "off"
bool | $isOn |
Definition at line 74 of file MaintenanceMode.php.
setAddresses | ( | $addresses | ) |
Sets list of allowed IP addresses
string | $addresses |
Definition at line 92 of file MaintenanceMode.php.
|
protected |
Definition at line 39 of file MaintenanceMode.php.
const FLAG_DIR = DirectoryList::VAR_DIR |
Maintenance flag dir
Definition at line 32 of file MaintenanceMode.php.
const FLAG_FILENAME = '.maintenance.flag' |
Maintenance flag file name
DO NOT consolidate this file and the IP white list into one. It is going to work much faster in 99% of cases: the isOn() will return false whenever file doesn't exist.
Definition at line 22 of file MaintenanceMode.php.
const IP_FILENAME = '.maintenance.ip' |
IP-addresses file name
Definition at line 27 of file MaintenanceMode.php.