class Configurator

Initial system DI container generator.

Traits

Strict class for better experience.

Constants

COOKIE_SECRET

Properties

callable[] $onCompile
array $defaultExtensions
string[] $autowireExcludedClasses
protected array $staticParameters
protected array $dynamicParameters
protected array $services
protected array $configs

Methods

__construct()

No description

setDebugMode(bool|string|array $value)

Set parameter %debugMode%.

bool
isDebugMode()

No description

setTempDirectory(string $path)

Sets path to temporary directory.

setTimeZone(string $timezone)

Sets the default timezone.

addParameters(array $params)

Alias for addStaticParameters()

addStaticParameters(array $params)

Adds new static parameters.

addDynamicParameters(array $params)

Adds new dynamic parameters.

addServices(array $services)

Add instances of services.

array
getDefaultParameters()

No description

void
enableTracy(string $logDirectory = null, string $email = null)

No description

void
enableDebugger(string $logDirectory = null, string $email = null)

Alias for enableTracy()

createRobotLoader()

No description

addConfig(string|array $config)

Adds configuration file.

createContainer()

Returns system DI container.

string
loadContainer()

Loads system DI container class and returns its name.

createLoader()

No description

string
getCacheDirectory()

No description

static bool
detectDebugMode(string|array $list = null)

Detects debug mode by IP addresses or computer names whitelist detection.

Details

at line 74
__construct()

at line 85
Configurator setDebugMode(bool|string|array $value)

Set parameter %debugMode%.

Parameters

bool|string|array $value

Return Value

Configurator

at line 98
bool isDebugMode()

Return Value

bool

at line 108
Configurator setTempDirectory(string $path)

Sets path to temporary directory.

Parameters

string $path

Return Value

Configurator

at line 119
Configurator setTimeZone(string $timezone)

Sets the default timezone.

Parameters

string $timezone

Return Value

Configurator

at line 131
Configurator addParameters(array $params)

Alias for addStaticParameters()

Parameters

array $params

Return Value

Configurator

at line 141
Configurator addStaticParameters(array $params)

Adds new static parameters.

Parameters

array $params

Return Value

Configurator

at line 152
Configurator addDynamicParameters(array $params)

Adds new dynamic parameters.

Parameters

array $params

Return Value

Configurator

at line 163
Configurator addServices(array $services)

Add instances of services.

Parameters

array $services

Return Value

Configurator

at line 170
protected array getDefaultParameters()

Return Value

array

at line 187
void enableTracy(string $logDirectory = null, string $email = null)

Parameters

string $logDirectory
string $email

Return Value

void

at line 198
void enableDebugger(string $logDirectory = null, string $email = null)

Alias for enableTracy()

Parameters

string $logDirectory
string $email

Return Value

void

at line 207
RobotLoader createRobotLoader()

Return Value

RobotLoader

Exceptions

NotSupportedException if RobotLoader is not available

at line 230
Configurator addConfig(string|array $config)

Adds configuration file.

Parameters

string|array $config

Return Value

Configurator

at line 240
Container createContainer()

Returns system DI container.

Return Value

Container

at line 255
string loadContainer()

Loads system DI container class and returns its name.

Return Value

string

at line 306
protected Loader createLoader()

Return Value

Loader

at line 312
protected string getCacheDirectory()

Return Value

string

at line 330
static bool detectDebugMode(string|array $list = null)

Detects debug mode by IP addresses or computer names whitelist detection.

Parameters

string|array $list

Return Value

bool