class Compiler

DI container compiler.

Traits

Strict class for better experience.

Constants

SERVICES

PARAMETERS

DI

Methods

__construct(ContainerBuilder $builder = null)

No description

addExtension(string|null $name, CompilerExtension $extension)

Add custom configurator extension.

array
getExtensions(string $type = null)

No description

setClassName(string $className)

No description

addConfig(array $config)

Adds new configuration.

loadConfig(string $file, Loader $loader = null)

Adds new configuration from file.

array
getConfig() deprecated

Returns configuration.

setDynamicParameterNames(array $names)

Sets the names of dynamic parameters.

addDependencies(array $deps)

Adds dependencies to the list.

array
exportDependencies()

Exports dependencies.

addExportedTag(string $tag)

No description

addExportedType(string $type)

No description

string
compile()

No description

void
processExtensions()

No description

string
generateCode()

No description

void
loadDefinitionsFromConfig(array $configList)

Loads list of service definitions from configuration.

static void
loadDefinitions() deprecated

No description

static void
loadDefinition() deprecated

No description

Details

at line 50
__construct(ContainerBuilder $builder = null)

Parameters

ContainerBuilder $builder

at line 63
Compiler addExtension(string|null $name, CompilerExtension $extension)

Add custom configurator extension.

Parameters

string|null $name
CompilerExtension $extension

Return Value

Compiler

at line 81
array getExtensions(string $type = null)

Parameters

string $type

Return Value

array

at line 89
ContainerBuilder getContainerBuilder()

Return Value

ContainerBuilder

at line 98
Compiler setClassName(string $className)

Parameters

string $className

Return Value

Compiler

at line 109
Compiler addConfig(array $config)

Adds new configuration.

Parameters

array $config

Return Value

Compiler

at line 123
Compiler loadConfig(string $file, Loader $loader = null)

Adds new configuration from file.

Parameters

string $file
Loader $loader

Return Value

Compiler

at line 140
array getConfig() deprecated

deprecated

Returns configuration.

Return Value

array

at line 150
Compiler setDynamicParameterNames(array $names)

Sets the names of dynamic parameters.

Parameters

array $names

Return Value

Compiler

at line 162
Compiler addDependencies(array $deps)

Adds dependencies to the list.

Parameters

array $deps of ReflectionClass|\ReflectionFunctionAbstract|string

Return Value

Compiler

at line 172
array exportDependencies()

Exports dependencies.

Return Value

array

at line 181
Compiler addExportedTag(string $tag)

Parameters

string $tag

Return Value

Compiler

at line 193
Compiler addExportedType(string $type)

Parameters

string $type

Return Value

Compiler

at line 202
string compile()

Return Value

string

at line 210
void processExtensions()

Return Value

void

at line 272
string generateCode()

Return Value

string

at line 299
void loadDefinitionsFromConfig(array $configList)

Loads list of service definitions from configuration.

Parameters

array $configList

Return Value

void

at line 309
static void loadDefinitions() deprecated

deprecated use non-static Compiler::loadDefinitionsFromConfig()

Return Value

void

at line 318
static void loadDefinition() deprecated

deprecated use non-static Compiler::loadDefinitionsFromConfig()

Return Value

void