Copied!

ContainerInterface is the interface implemented by service container classes.

AbstractInterface
Constants
public Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE = 1
public Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE = 3
public Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE = 4
public Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE = 2
public Symfony\Component\DependencyInjection\ContainerInterface::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE = 0
Methods
public abstract get(string $id, int $invalidBehavior = 1self::EXCEPTION_ON_INVALID_REFERENCE) : ?object
 
  • template B of self::*_REFERENCE
  • param \B $invalidBehavior
  • psalm-return (B is self::EXCEPTION_ON_INVALID_REFERENCE|self::RUNTIME_EXCEPTION_ON_INVALID_REFERENCE ? object : object|null)
  • throws \ServiceCircularReferenceException When a circular reference is detected
  • throws \ServiceNotFoundException When the service is not defined
  • see \Reference
public abstract getParameter(string $name) : UnitEnum|array|string|int|float|bool|?null
 
  • throws \ParameterNotFoundException if the parameter is not defined
public abstract has(string $id) : bool
public abstract hasParameter(string $name) : bool
public abstract initialized(string $id) : bool
 

Check for whether or not a service has been initialized.

public abstract set(string $id, ?object $service) : void
public abstract setParameter(string $name, UnitEnum|array|string|int|float|bool|?null $value) : void
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration