\donbidon\CoreBootstrap

Core environment initialization.

Summary

Methods
Properties
Constants
initByPath()
initByArray()
No public properties found
EX_CANNOT_OPEN_CONFIG
EX_CANNOT_PARSE_CONFIG
EX_INVALID_ARG
getRegistry()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

EX_CANNOT_OPEN_CONFIG

EX_CANNOT_OPEN_CONFIG = 1

Exception code

EX_CANNOT_PARSE_CONFIG

EX_CANNOT_PARSE_CONFIG = 2

Exception code

EX_INVALID_ARG

EX_INVALID_ARG = 4

Exception code

Methods

initByPath()

initByPath(string  $path, array  $options = array('registry' => \donbidon\Core\Registry\Recursive::ALL_INCLUSIVE)) : \donbidon\Core\Registry\I_Registry

Initializes environment by config file path.

Parameters

string $path
array $options

Array of options:

  • (int)registry - see Recursive::__construct().

Throws

\RuntimeException

If passed file doesn't exist or cannot be read.

\RuntimeException

If cannot parse config file.

Returns

\donbidon\Core\Registry\I_Registry

initByArray()

initByArray(array  $config, array  $options = array('registry' => \donbidon\Core\Registry\Recursive::ALL_INCLUSIVE)) : \donbidon\Core\Registry\I_Registry

Initializes environment by config array.

Parameters

array $config
array $options

Array of options:

  • (int)registry - see Recursive::__construct().

Throws

\InvalidArgumentException

Returns

\donbidon\Core\Registry\I_Registry

getRegistry()

getRegistry(array  $config, integer  $options) : \donbidon\Core\Registry\I_Registry

Returns registry instance.

Called from \donbidon\Core\static::initByArray().

Parameters

array $config
integer $options

Returns

\donbidon\Core\Registry\I_Registry