ContainerInterface

interface ContainerInterface ContainerInterface is the interface implemented by service container classes. Constants EXCEPTION_ON_INVALID_REFERENCE NULL_ON_INVALID_REFERENCE IGNORE_ON_INVALID_REFERENCE Methods set(string $id, object $service) Sets a service. object get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) Gets a service. bool has(string $id) Returns true if the given service is defined. bool initialized(string $id) Check fo

ContainerDebugCommand

class ContainerDebugCommand extends ContainerAwareCommand A console command for retrieving information about services. Methods __construct(string|null $name = null) Constructor. from Command ignoreValidationErrors() Ignores validation errors. from Command setApplication(Application $application = null) Sets the application instance for this command. from Command setHelperSet(HelperSet $helperSet) Sets the helper set. from Command HelperSet getHelperSet() Gets the helper s

ContainerBuilder::setResourceTracking()

setResourceTracking(bool $track) Sets the track resources flag. If you are not using the loaders and therefore don't want to depend on the Config component, set this flag to false. Parameters bool $track true if you want to track resources, false otherwise

ContainerBuilderDebugDumpPass

class ContainerBuilderDebugDumpPass implements CompilerPassInterface Dumps the ContainerBuilder to a cache file so that it can be used by debugging tools such as the debug:container console command. Methods process(ContainerBuilder $container) You can modify the container here before it is dumped to PHP code. Details process(ContainerBuilder $container) You can modify the container here before it is dumped to PHP code. Parameters ContainerBu

ContainerBuilder::setResources()

ContainerBuilder setResources(array $resources) Sets the resources for this configuration. Parameters array $resources An array of resources Return Value ContainerBuilder The current instance

ContainerBuilder::setProxyInstantiator()

setProxyInstantiator(InstantiatorInterface $proxyInstantiator) Sets the instantiator to be used when fetching proxies. Parameters InstantiatorInterface $proxyInstantiator

ContainerBuilder::setDefinition()

Definition setDefinition(string $id, Definition $definition) Sets a service definition. Parameters string $id The service identifier Definition $definition A Definition instance Return Value Definition the service definition Exceptions BadMethodCallException When this ContainerBuilder is frozen

ContainerBuilder::setDefinitions()

setDefinitions(array $definitions) Sets the service definitions. Parameters array $definitions An array of service definitions

ContainerBuilder::setAliases()

setAliases(array $aliases) Sets the service aliases. Parameters array $aliases An array of aliases

ContainerBuilder::setAlias()

setAlias(string $alias, string|Alias $id) Sets an alias for an existing service. Parameters string $alias The alias to create string|Alias $id The service to alias Exceptions InvalidArgumentException if the id is not a string or an Alias InvalidArgumentException if the alias is for itself