platform/api/symfony/Component/DependencyInjection/Container.yaml

255 lines
8.5 KiB
YAML
Raw Normal View History

2024-09-02 17:44:11 +00:00
name: Container
class_comment: '# * Container is a dependency injection container.
# *
# * It gives access to object instances (services).
# * Services and parameters are simple key/pair stores.
# * The container can have four possible behaviors when a service
# * does not exist (or is not initialized for the last case):
# *
# * * EXCEPTION_ON_INVALID_REFERENCE: Throws an exception at compilation time (the
default)
# * * NULL_ON_INVALID_REFERENCE: Returns null
# * * IGNORE_ON_INVALID_REFERENCE: Ignores the wrapping command asking for the
reference
# * (for instance, ignore a setter if the service
does not exist)
# * * IGNORE_ON_UNINITIALIZED_REFERENCE: Ignores/returns null for uninitialized
services or invalid references
# * * RUNTIME_EXCEPTION_ON_INVALID_REFERENCE: Throws an exception at runtime
# *
# * @author Fabien Potencier <fabien@symfony.com>
# * @author Johannes M. Schmitt <schmittjoh@gmail.com>'
dependencies:
- name: RewindableGenerator
type: class
source: Symfony\Component\DependencyInjection\Argument\RewindableGenerator
- name: ArgumentServiceLocator
type: class
source: Symfony\Component\DependencyInjection\Argument\ServiceLocator
- name: EnvNotFoundException
type: class
source: Symfony\Component\DependencyInjection\Exception\EnvNotFoundException
- name: InvalidArgumentException
type: class
source: Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
- name: ParameterCircularReferenceException
type: class
source: Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException
- name: ParameterNotFoundException
type: class
source: Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException
- name: RuntimeException
type: class
source: Symfony\Component\DependencyInjection\Exception\RuntimeException
- name: ServiceCircularReferenceException
type: class
source: Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException
- name: ServiceNotFoundException
type: class
source: Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException
- name: EnvPlaceholderParameterBag
type: class
source: Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag
- name: FrozenParameterBag
type: class
source: Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag
- name: ParameterBag
type: class
source: Symfony\Component\DependencyInjection\ParameterBag\ParameterBag
- name: ParameterBagInterface
type: class
source: Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface
- name: ResetInterface
type: class
source: Symfony\Contracts\Service\ResetInterface
properties: []
methods:
- name: compile
visibility: public
parameters: []
comment: "# * Container is a dependency injection container.\n# *\n# * It gives\
\ access to object instances (services).\n# * Services and parameters are simple\
\ key/pair stores.\n# * The container can have four possible behaviors when a\
\ service\n# * does not exist (or is not initialized for the last case):\n# *\n\
# * * EXCEPTION_ON_INVALID_REFERENCE: Throws an exception at compilation time\
\ (the default)\n# * * NULL_ON_INVALID_REFERENCE: Returns null\n# * * IGNORE_ON_INVALID_REFERENCE:\
\ Ignores the wrapping command asking for the reference\n# * \
\ (for instance, ignore a setter if the service does not\
\ exist)\n# * * IGNORE_ON_UNINITIALIZED_REFERENCE: Ignores/returns null for uninitialized\
\ services or invalid references\n# * * RUNTIME_EXCEPTION_ON_INVALID_REFERENCE:\
\ Throws an exception at runtime\n# *\n# * @author Fabien Potencier <fabien@symfony.com>\n\
# * @author Johannes M. Schmitt <schmittjoh@gmail.com>\n# */\n# class Container\
\ implements ContainerInterface, ResetInterface\n# {\n# protected ParameterBagInterface\
\ $parameterBag;\n# protected array $services = [];\n# protected array $privates\
\ = [];\n# protected array $fileMap = [];\n# protected array $methodMap = [];\n\
# protected array $factories = [];\n# protected array $aliases = [];\n# protected\
\ array $loading = [];\n# protected array $resolving = [];\n# protected array\
\ $syntheticIds = [];\n# \n# private array $envCache = [];\n# private bool $compiled\
\ = false;\n# private \\Closure $getEnv;\n# \n# private static \\Closure $make;\n\
# \n# public function __construct(?ParameterBagInterface $parameterBag = null)\n\
# {\n# $this->parameterBag = $parameterBag ?? new EnvPlaceholderParameterBag();\n\
# }\n# \n# /**\n# * Compiles the container.\n# *\n# * This method does two things:\n\
# *\n# * * Parameter values are resolved;\n# * * The parameter bag is frozen."
- name: isCompiled
visibility: public
parameters: []
comment: '# * Returns true if the container is compiled.'
- name: getParameterBag
visibility: public
parameters: []
comment: '# * Gets the service container parameter bag.'
- name: getParameter
visibility: public
parameters:
- name: name
comment: '# * Gets a parameter.
# *
# * @throws ParameterNotFoundException if the parameter is not defined'
- name: hasParameter
visibility: public
parameters:
- name: name
comment: null
- name: setParameter
visibility: public
parameters:
- name: name
- name: value
comment: null
- name: set
visibility: public
parameters:
- name: id
- name: service
comment: '# * Sets a service.
# *
# * Setting a synthetic service to null resets it: has() returns false and get()
# * behaves in the same way as if the service was never created.'
- name: has
visibility: public
parameters:
- name: id
comment: null
- name: get
visibility: public
parameters:
- name: id
- name: invalidBehavior
default: self::EXCEPTION_ON_INVALID_REFERENCE
comment: '# * Gets a service.
# *
# * @throws ServiceCircularReferenceException When a circular reference is detected
# * @throws ServiceNotFoundException When the service is not defined
# *
# * @see Reference'
- name: make
visibility: private
parameters:
- name: container
- name: id
- name: invalidBehavior
comment: '# * Creates a service.
# *
# * As a separate method to allow "get()" to use the really fast `??` operator.'
- name: initialized
visibility: public
parameters:
- name: id
comment: '# * Returns true if the given service has actually been initialized.'
- name: reset
visibility: public
parameters: []
comment: null
- name: getServiceIds
visibility: public
parameters: []
comment: '# * Gets all service ids.
# *
# * @return string[]'
- name: getRemovedIds
visibility: public
parameters: []
comment: '# * Gets service ids that existed at compile time.'
- name: camelize
visibility: public
parameters:
- name: id
comment: '# * Camelizes a string.'
- name: underscore
visibility: public
parameters:
- name: id
comment: '# * A string to underscore.'
- name: load
visibility: protected
parameters:
- name: file
comment: '# * Creates a service by requiring its factory file.'
- name: getEnv
visibility: protected
parameters:
- name: name
comment: '# * Fetches a variable from the environment.
# *
# * @throws EnvNotFoundException When the environment variable is not found and
has no default value'
- name: getService
visibility: protected
parameters:
- name: registry
- name: id
- name: method
- name: load
comment: null
- name: __clone
visibility: private
parameters: []
comment: null
traits:
- Symfony\Component\DependencyInjection\Argument\RewindableGenerator
- Symfony\Component\DependencyInjection\Exception\EnvNotFoundException
- Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
- Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException
- Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException
- Symfony\Component\DependencyInjection\Exception\RuntimeException
- Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException
- Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException
- Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag
- Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag
- Symfony\Component\DependencyInjection\ParameterBag\ParameterBag
- Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface
- Symfony\Contracts\Service\ResetInterface
interfaces:
- ContainerInterface