ContainerBuilder::addObjectResource()

ContainerBuilder addObjectResource(object $object) Adds the object class hierarchy as resources. Parameters object $object An object instance Return Value ContainerBuilder The current instance

ContainerBuilder::compile()

compile() Compiles the container. This method passes the container to compiler passes whose job is to manipulate and optimize the container. The main compiler passes roughly do four things: The extension configurations are merged; Parameter values are resolved; The parameter bag is frozen; Extension loading is disabled.

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

ContainerBuilder::addCompilerPass()

ContainerBuilder addCompilerPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION) Adds a compiler pass. Parameters CompilerPassInterface $pass A compiler pass string $type The type of compiler pass Return Value ContainerBuilder The current instance

ContainerBuilder::addExpressionLanguageProvider()

addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) Parameters ExpressionFunctionProviderInterface $provider

ContainerBuilder::addClassResource()

ContainerBuilder addClassResource(ReflectionClass $class) Adds the given class hierarchy as resources. Parameters ReflectionClass $class Return Value ContainerBuilder The current instance

ContainerBuilder::addDefinitions()

addDefinitions(array $definitions) Adds the service definitions. Parameters array $definitions An array of service definitions

ContainerBuilder

class ContainerBuilder extends Container implements TaggedContainerInterface ContainerBuilder is a DI container that provides an API to easily describe services. Methods __construct(ParameterBagInterface $parameterBag = null) from Container compile() Compiles the container. bool isFrozen() Returns true if the container parameter bag are frozen. from Container ParameterBagInterface getParameterBag() Gets the service container parameter bag. from Container mixed getParame

ContainerBuilder::addAliases()

addAliases(array $aliases) Adds the service aliases. Parameters array $aliases An array of aliases

ContainerAwareTrait

trait ContainerAwareTrait ContainerAware trait. Methods setContainer(ContainerInterface $container = null) Sets the container. Details setContainer(ContainerInterface $container = null) Sets the container. Parameters ContainerInterface $container A ContainerInterface instance or null