ContainerBuilder::getDefinitions()

Definition[] getDefinitions() Gets all service definitions. Return Value Definition[] An array of Definition instances

ContainerBuilder::getDefinition()

Definition getDefinition(string $id) Gets a service definition. Parameters string $id The service identifier Return Value Definition A Definition instance Exceptions ServiceNotFoundException if the service definition does not exist

ContainerBuilder::getCompilerPassConfig()

PassConfig getCompilerPassConfig() Returns the compiler pass config which can then be modified. Return Value PassConfig The compiler pass config

ContainerBuilder::getCompiler()

Compiler getCompiler() Returns the compiler. Return Value Compiler The compiler

ContainerBuilder::getAliases()

Alias[] getAliases() Gets all defined aliases. Return Value Alias[] An array of aliases

ContainerBuilder::getAlias()

Alias getAlias(string $id) Gets an alias. Parameters string $id The service identifier Return Value Alias An Alias instance Exceptions InvalidArgumentException if the alias does not exist

ContainerBuilder::findUnusedTags()

string[] findUnusedTags() Returns all tags not queried by findTaggedServiceIds. Return Value string[] An array of tags

ContainerBuilder::findTags()

array findTags() Returns all tags the defined services use. Return Value array An array of tags

ContainerBuilder::findTaggedServiceIds()

array findTaggedServiceIds(string $name) Returns service ids for a given tag. Example: $container->register('foo')->addTag('my.tag', array('hello' => 'world')); $serviceIds = $container->findTaggedServiceIds('my.tag'); foreach ($serviceIds as $serviceId => $tags) { foreach ($tags as $tag) { echo $tag['hello']; } } Parameters string $name The tag name Return Value array An array of tags

ContainerBuilder::findDefinition()

Definition findDefinition(string $id) Gets a service definition by id or alias. The method "unaliases" recursively to return a Definition instance. Parameters string $id The service identifier or alias Return Value Definition A Definition instance Exceptions ServiceNotFoundException if the service definition does not exist