ContainerBuilder
class ContainerBuilder extends Object
Basic container builder.
Constants
THIS_SERVICE |
|
THIS_CONTAINER |
|
Properties
array | $parameters | ||
string | $currentService |
Methods
Removes the specified service definition.
Gets the service definition.
Gets all service definitions.
Does the service definition or alias exist?
No description
Removes the specified alias.
Gets all service aliases.
No description
No description
Resolves service name by type.
Gets the service names and definitions of the specified type.
Gets the service objects of the specified tag.
Creates a list of arguments using autowiring.
Generates $dependencies, $classes and normalizes class names.
No description
Adds a file to the list of dependencies.
Returns the list of dependent files.
Generates PHP classes. First class is the container.
Formats PHP code for class instantiating, function calling or property setting in PHP.
Formats PHP statement.
No description
No description
Converts @service or @\Class -> service name and checks its existence.
Details
at line 58
ServiceDefinition
addDefinition($name, ServiceDefinition $definition = NULL)
Adds new service definition.
at line 76
void
removeDefinition($name)
Removes the specified service definition.
at line 96
ServiceDefinition
getDefinition($name)
Gets the service definition.
at line 110
ServiceDefinition[]
getDefinitions()
Gets all service definitions.
at line 121
bool
hasDefinition($name)
Does the service definition or alias exist?
at line 132
addAlias($alias, $service)
No description
at line 155
void
removeAlias($alias)
Removes the specified alias.
at line 165
array
getAliases()
Gets all service aliases.
at line 174
ContainerBuilder
setClassName($name)
No description
at line 184
string
getClassName()
No description
at line 199
string|null
getByType($class)
Resolves service name by type.
at line 228
ServiceDefinition[]
findByType($class)
Gets the service names and definitions of the specified type.
at line 247
array
findByTag($tag)
Gets the service objects of the specified tag.
at line 263
array
autowireArguments($class, $method, array $arguments)
Creates a list of arguments using autowiring.
at line 287
array
prepareClassList()
internal |
Generates $dependencies, $classes and normalizes class names.
at line 508
ContainerBuilder
addExcludedClasses(array $classes)
No description
at line 520
ContainerBuilder
addDependency($file)
internal |
Adds a file to the list of dependencies.
at line 531
array
getDependencies()
Returns the list of dependent files.
at line 545
ClassType[]
generateClasses($className = NULL, $parentName = NULL)
Generates PHP classes. First class is the container.
at line 689
string
formatStatement(Statement $statement)
internal |
Formats PHP code for class instantiating, function calling or property setting in PHP.
at line 765
string
formatPhp($statement, $args)
internal |
Formats PHP statement.
at line 812
mixed
expand($value)
deprecated
deprecated
Expands %placeholders% in strings.
at line 821
static PhpLiteral
literal($phpCode)
No description
at line 828
normalizeEntity($entity)
internal |
No description
at line 852
string
getServiceName($arg)
internal |
Converts @service or @\Class -> service name and checks its existence.