ContainerBuilder
class ContainerBuilder
Container builder.
Constants
| ThisService |
|
| ThisContainer |
|
| THIS_SERVICE |
|
| THIS_CONTAINER |
|
Properties
| array<string,mixed> | $parameters |
Methods
No description
Adds new service definition.
No description
No description
No description
No description
Removes the specified service definition.
Gets the service definition.
Gets all service definitions.
Does the service definition or alias exist?
No description
No description
Gets all service aliases.
Excludes classes from autowiring.
Resolves autowired service name by type.
Gets autowired service definition of the specified type.
Gets the autowired service names and definitions of the specified type.
Gets the service names and definitions of the specified type.
Gets the service names and tag values.
Resolves service types and rebuilds the autowiring class list.
Completes all service definitions by resolving and wiring arguments.
Adds item to the list of dependencies.
Returns the list of dependencies.
No description
Creates a PHP literal value, optionally formatted with arguments.
Details
at line 46
__construct()
No description
at line 59
Definition
addDefinition(string|null $name, Definition|null $definition = null)
Adds new service definition.
at line 100
AccessorDefinition
addAccessorDefinition(string|null $name)
No description
at line 106
FactoryDefinition
addFactoryDefinition(string|null $name)
No description
at line 112
LocatorDefinition
addLocatorDefinition(string|null $name)
No description
at line 118
ImportedDefinition
addImportedDefinition(string|null $name)
No description
at line 127
void
removeDefinition(string $name)
Removes the specified service definition.
at line 138
Definition
getDefinition(string $name)
Gets the service definition.
at line 153
array
getDefinitions()
Gets all service definitions.
at line 162
bool
hasDefinition(string $name)
Does the service definition or alias exist?
at line 169
void
addAlias(string $alias, string $service)
No description
at line 188
void
removeAlias(string $alias)
No description
at line 198
array
getAliases()
Gets all service aliases.
at line 208
ContainerBuilder
addExcludedClasses(array $types)
Excludes classes from autowiring.
at line 223
string|null
getByType(string $type, bool $throw = false)
Resolves autowired service name by type.
at line 235
Definition
getDefinitionByType(string $type)
Gets autowired service definition of the specified type.
at line 248
array
findAutowired(string $type)
| internal |
Gets the autowired service names and definitions of the specified type.
at line 261
array
findByType(string $type)
Gets the service names and definitions of the specified type.
at line 279
array
findByTag(string $tag)
Gets the service names and tag values.
at line 298
void
resolve()
Resolves service types and rebuilds the autowiring class list.
at line 330
void
complete()
Completes all service definitions by resolving and wiring arguments.
at line 349
ContainerBuilder
addDependency(ReflectionClass|ReflectionFunctionAbstract|string $dep)
| internal |
Adds item to the list of dependencies.
at line 360
array
getDependencies()
Returns the list of dependencies.
at line 370
array
exportMeta()
| internal |
No description
at line 409
static Literal
literal(string $code, array|null $args = null)
Creates a PHP literal value, optionally formatted with arguments.
at line 421
string
formatPhp(string $statement, array $args)
deprecated
deprecated
No description