Compiler
class Compiler
DI container compiler.
Constants
| private Services |
|
| private Parameters |
|
| private DI |
|
Methods
Adds a compiler extension. Pass null as name to auto-assign a name.
Returns all registered extensions, optionally filtered by type.
No description
Sets the class name of the generated container.
Adds new configuration from file.
Sets the names of dynamic parameters.
Adds dependencies to the list.
Exports dependencies.
Adds a tag to export from the container.
Adds a type to export from the container.
Compiles the container and returns the generated PHP code.
No description
No description
Loads list of service definitions from configuration.
No description
No description
Details
at line 38
__construct(ContainerBuilder $builder = new ContainerBuilder())
No description
at line 50
Compiler
addExtension(string|null $name, CompilerExtension $extension)
Adds a compiler extension. Pass null as name to auto-assign a name.
at line 80
array
getExtensions(string|null $type = null)
Returns all registered extensions, optionally filtered by type.
at line 88
ContainerBuilder
getContainerBuilder()
No description
at line 97
Compiler
setClassName(string $className)
Sets the class name of the generated container.
at line 108
Compiler
addConfig(array $config)
Adds new configuration.
at line 122
Compiler
loadConfig(string $file, Loader|null $loader = null)
Adds new configuration from file.
at line 141
array
getConfig()
deprecated
deprecated
Returns configuration.
at line 151
Compiler
setDynamicParameterNames(array $names)
Sets the names of dynamic parameters.
at line 163
Compiler
addDependencies(array $deps)
Adds dependencies to the list.
at line 174
array
exportDependencies()
Exports dependencies.
at line 183
Compiler
addExportedTag(string $tag)
Adds a tag to export from the container.
at line 198
Compiler
addExportedType(string $type)
Adds a type to export from the container.
at line 212
string
compile()
Compiles the container and returns the generated PHP code.
at line 221
void
processExtensions()
| internal |
No description
at line 311
string
generateCode()
| internal |
No description
at line 330
void
loadDefinitionsFromConfig(array $configList)
Loads list of service definitions from configuration.
at line 341
protected PhpGenerator
createPhpGenerator()
No description
at line 348
Loader
createLoader(array $params = [])
| internal |
No description