[ Index ]

PHP Cross Reference of phpBB-3.3.9-deutsch




/vendor/symfony/dependency-injection/ -> Container.php (summary)

(no description)

File Size: 526 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Container:: (21 methods):

Class: Container  - X-Ref

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 (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

__construct(ParameterBagInterface $parameterBag = null)   X-Ref

compile()   X-Ref
Compiles the container.

This method does two things:

* Parameter values are resolved;
* The parameter bag is frozen.

isCompiled()   X-Ref
Returns true if the container is compiled.

return: bool

isFrozen()   X-Ref
Returns true if the container parameter bag are frozen.

return: bool true if the container parameter bag are frozen, false otherwise

getParameterBag()   X-Ref
Gets the service container parameter bag.

return: ParameterBagInterface A ParameterBagInterface instance

getParameter($name)   X-Ref
Gets a parameter.

param: string $name The parameter name
return: mixed The parameter value

hasParameter($name)   X-Ref
Checks if a parameter exists.

param: string $name The parameter name
return: bool The presence of parameter in container

setParameter($name, $value)   X-Ref
Sets a parameter.

param: string $name  The parameter name
param: mixed  $value The parameter value

set($id, $service)   X-Ref
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.

param: string      $id      The service identifier
param: object|null $service The service instance

has($id)   X-Ref
Returns true if the given service is defined.

param: string $id The service identifier
return: bool true if the service is defined, false otherwise

get($id, $invalidBehavior = 1)   X-Ref
Gets a service.

If a service is defined both through a set() method and
with a get{$id}Service() method, the former has always precedence.

param: string $id              The service identifier
param: int    $invalidBehavior The behavior when the service does not exist
return: object|null The associated service

initialized($id)   X-Ref
Returns true if the given service has actually been initialized.

param: string $id The service identifier
return: bool true if service has already been initialized, false otherwise

reset()   X-Ref

getServiceIds()   X-Ref
Gets all service ids.

return: string[] An array of all defined service ids

getRemovedIds()   X-Ref
Gets service ids that existed at compile time.

return: array

camelize($id)   X-Ref
Camelizes a string.

param: string $id A string to camelize
return: string The camelized string

underscore($id)   X-Ref
A string to underscore.

param: string $id The string to underscore
return: string The underscored string

load($file)   X-Ref
Creates a service by requiring its factory file.

getEnv($name)   X-Ref
Fetches a variable from the environment.

param: string $name The name of the environment variable
return: mixed The value to use for the provided environment variable name

normalizeId($id)   X-Ref
Returns the case sensitive id used at registration time.

param: string $id
return: string

__clone()   X-Ref
No description

Generated: Wed Dec 7 15:09:22 2022 Cross-referenced by PHPXref 0.7.1