Copied!

Turns public and "container.reversible" services back to their ids.

CloneableFinalInstantiable
Methods
public __construct(Symfony\Component\DependencyInjection\Container $serviceContainer, Psr\Container\ContainerInterface $reversibleLocator, string $tagName = 'container.reversible')
public getId(object $service) : ?string
 

Returns the id of the passed object when it exists as a service.

To be reversible, services need to be either public or be tagged with "container.reversible".

public getService(string $id) : object
 
  • throws \ServiceNotFoundException When the service is not reversible
Properties
private Closure $getServiceId
private Psr\Container\ContainerInterface $reversibleLocator
private Symfony\Component\DependencyInjection\Container $serviceContainer
private string $tagName
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration