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::addResource()

ContainerBuilder addResource(ResourceInterface $resource) Adds a resource for this configuration. Parameters ResourceInterface $resource A resource instance Return Value ContainerBuilder The current instance

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::addExpressionLanguageProvider()

addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) Parameters ExpressionFunctionProviderInterface $provider

ContainerBuilder::addDefinitions()

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

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::addClassResource()

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

ContainerBuilder::addAliases()

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

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

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