Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (ObjectManagerFactory $factory, $rootDir, array $initParams) | |
getParams () | |
createApplication ($type, $arguments=[]) | |
run (AppInterface $application) | |
getObjectManager () | |
getErrorCode () | |
isDeveloperMode () | |
Static Public Member Functions | |
static | create ($rootDir, array $initParams, ObjectManagerFactory $factory=null) |
static | populateAutoloader ($rootDir, $initParams) |
static | createObjectManagerFactory ($rootDir, array $initParams) |
static | createFilesystemDirectoryList ($rootDir, array $initParams) |
static | createFilesystemDriverPool (array $initParams) |
static | createConfigFilePool () |
Data Fields | |
const | ERR_MAINTENANCE = 901 |
const | ERR_IS_INSTALLED = 902 |
const | PARAM_REQUIRE_MAINTENANCE = 'MAGE_REQUIRE_MAINTENANCE' |
const | PARAM_REQUIRE_IS_INSTALLED = 'MAGE_REQUIRE_IS_INSTALLED' |
const | DEFAULT_REQUIRE_MAINTENANCE = false |
const | DEFAULT_REQUIRE_IS_INSTALLED = true |
const | INIT_PARAM_FILESYSTEM_DIR_PATHS = 'MAGE_DIRS' |
const | INIT_PARAM_FILESYSTEM_DRIVERS = 'MAGE_FILESYSTEM_DRIVERS' |
Protected Member Functions | |
assertInstalled () | |
terminate (\Exception $e) | |
A bootstrap of Magento application
Performs basic initialization root function: injects init parameters and creates object manager Can create/run applications
@api @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 27 of file Bootstrap.php.
__construct | ( | ObjectManagerFactory | $factory, |
$rootDir, | |||
array | $initParams | ||
) |
Constructor
ObjectManagerFactory | $factory | |
string | $rootDir | |
array | $initParams |
Definition at line 205 of file Bootstrap.php.
|
protected |
Asserts whether application is installed
Definition at line 311 of file Bootstrap.php.
|
static |
Static method so that client code does not have to create Object Manager Factory every time Bootstrap is called
string | $rootDir | |
array | $initParams | |
ObjectManagerFactory | $factory |
Definition at line 119 of file Bootstrap.php.
createApplication | ( | $type, | |
$arguments = [] |
|||
) |
Factory method for creating application instances
string | $type | |
array | $arguments |
Definition at line 231 of file Bootstrap.php.
|
static |
Creates instance of configuration files pool
Definition at line 193 of file Bootstrap.php.
|
static |
Creates instance of filesystem directory list
string | $rootDir | |
array | $initParams |
Definition at line 164 of file Bootstrap.php.
|
static |
Creates instance of filesystem driver pool
array | $initParams |
Definition at line 179 of file Bootstrap.php.
|
static |
Creates instance of object manager factory
string | $rootDir | |
array | $initParams |
Definition at line 149 of file Bootstrap.php.
getErrorCode | ( | ) |
getObjectManager | ( | ) |
Gets the object manager instance
Definition at line 365 of file Bootstrap.php.
getParams | ( | ) |
isDeveloperMode | ( | ) |
Checks whether developer mode is set in the initialization parameters
Definition at line 396 of file Bootstrap.php.
|
static |
Populates autoloader with mapping info
string | $rootDir | |
array | $initParams |
Definition at line 135 of file Bootstrap.php.
run | ( | AppInterface | $application | ) |
Runs an application
\Magento\Framework\AppInterface | $application |
Definition at line 250 of file Bootstrap.php.
|
protected |
Display an exception and terminate program execution
\Exception | $e |
Definition at line 419 of file Bootstrap.php.
const DEFAULT_REQUIRE_IS_INSTALLED = true |
Definition at line 56 of file Bootstrap.php.
const DEFAULT_REQUIRE_MAINTENANCE = false |
#- #+ Default behavior of bootstrap assertions
Definition at line 55 of file Bootstrap.php.
const ERR_IS_INSTALLED = 902 |
Definition at line 33 of file Bootstrap.php.
const ERR_MAINTENANCE = 901 |
#+ Possible errors that can be triggered by the bootstrap
Definition at line 32 of file Bootstrap.php.
const INIT_PARAM_FILESYSTEM_DIR_PATHS = 'MAGE_DIRS' |
#- Initialization parameter for custom directory paths
Definition at line 62 of file Bootstrap.php.
const INIT_PARAM_FILESYSTEM_DRIVERS = 'MAGE_FILESYSTEM_DRIVERS' |
Initialization parameter for additional filesystem drivers
Definition at line 67 of file Bootstrap.php.
const PARAM_REQUIRE_IS_INSTALLED = 'MAGE_REQUIRE_IS_INSTALLED' |
Definition at line 49 of file Bootstrap.php.
const PARAM_REQUIRE_MAINTENANCE = 'MAGE_REQUIRE_MAINTENANCE' |
#- #+ Initialization parameters that allow control bootstrap behavior of asserting maintenance mode or is installed
Possible values:
If key is absent in the parameters array, the default behavior will be used
Definition at line 48 of file Bootstrap.php.