interface TaggedContainerInterface implements ContainerInterface
TaggedContainerInterface is the interface implemented when a container knows how to deals with tags.
set(string $id, object $service, string $scope = self::SCOPE_CONTAINER) Sets a service. | from ContainerInterface | |
object | get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) Gets a service. | from ContainerInterface |
bool | has(string $id) Returns true if the given service is defined. | from ContainerInterface |
mixed | getParameter(string $name) Gets a parameter. | from ContainerInterface |
bool | hasParameter(string $name) Checks if a parameter exists. | from ContainerInterface |
setParameter(string $name, mixed $value) Sets a parameter. | from ContainerInterface | |
enterScope(string $name) deprecated Enters the given scope. | from ContainerInterface | |
leaveScope(string $name) deprecated Leaves the current scope, and re-enters the parent scope. | from ContainerInterface | |
addScope(ScopeInterface $scope) deprecated Adds a scope to the container. | from ContainerInterface | |
bool | hasScope(string $name) deprecated Whether this container has the given scope. | from ContainerInterface |
bool | isScopeActive(string $name) deprecated Determines whether the given scope is currently active. | from ContainerInterface |
array | findTaggedServiceIds(string $name) Returns service ids for a given tag. |
Sets a service.
Note: The $scope parameter is deprecated since version 2.8 and will be removed in 3.0.
string | $id | The service identifier |
object | $service | The service instance |
string | $scope | The scope of the service |
Gets a service.
string | $id | The service identifier |
int | $invalidBehavior | The behavior when the service does not exist |
object | The associated service |
ServiceCircularReferenceException | When a circular reference is detected |
ServiceNotFoundException | When the service is not defined |
Reference |
Returns true if the given service is defined.
string | $id | The service identifier |
bool | true if the service is defined, false otherwise |
Gets a parameter.
string | $name | The parameter name |
mixed | The parameter value |
InvalidArgumentException | if the parameter is not defined |
Checks if a parameter exists.
string | $name | The parameter name |
bool | The presence of parameter in container |
Sets a parameter.
string | $name | The parameter name |
mixed | $value | The parameter value |
deprecated
Enters the given scope.
string | $name |
deprecated
Leaves the current scope, and re-enters the parent scope.
string | $name |
deprecated
Adds a scope to the container.
ScopeInterface | $scope |
deprecated
Whether this container has the given scope.
string | $name |
bool |
deprecated
Determines whether the given scope is currently active.
It does however not check if the scope actually exists.
string | $name |
bool |
Returns service ids for a given tag.
string | $name | The tag name |
array | An array of tags |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/DependencyInjection/TaggedContainerInterface.html