ReverseContainer
in package
Turns public and "container.reversible" services back to their ids.
Tags
Table of Contents
- $getServiceId : mixed
- $reversibleLocator : mixed
- $serviceContainer : mixed
- $tagName : mixed
- __construct() : mixed
- getId() : string|null
- Returns the id of the passed object when it exists as a service.
- getService() : object
Properties
$getServiceId
private
mixed
$getServiceId
$reversibleLocator
private
mixed
$reversibleLocator
$serviceContainer
private
mixed
$serviceContainer
$tagName
private
mixed
$tagName
Methods
__construct()
public
__construct(Container $serviceContainer, ContainerInterface $reversibleLocator[, string $tagName = 'container.reversible' ]) : mixed
Parameters
- $serviceContainer : Container
- $reversibleLocator : ContainerInterface
- $tagName : string = 'container.reversible'
Return values
mixed —getId()
Returns the id of the passed object when it exists as a service.
public
getId(object $service) : string|null
To be reversible, services need to be either public or be tagged with "container.reversible".
Parameters
- $service : object
Return values
string|null —getService()
public
getService(string $id) : object
Parameters
- $id : string