ServiceLocatorTrait
A trait to help implement ServiceProviderInterface.
Tags
Table of Contents
- $factories : mixed
- $loading : mixed
- $providedTypes : mixed
- __construct() : mixed
- get() : mixed
- {@inheritdoc}
- getProvidedServices() : array<string|int, mixed>
- {@inheritdoc}
- has() : bool
- {@inheritdoc}
- createCircularReferenceException() : ContainerExceptionInterface
- createNotFoundException() : NotFoundExceptionInterface
Properties
$factories
private
mixed
$factories
$loading
private
mixed
$loading
= []
$providedTypes
private
mixed
$providedTypes
Methods
__construct()
public
__construct(array<string|int, callable> $factories) : mixed
Parameters
- $factories : array<string|int, callable>
Return values
mixed —get()
{@inheritdoc}
public
get(string $id) : mixed
Parameters
- $id : string
Return values
mixed —getProvidedServices()
{@inheritdoc}
public
getProvidedServices() : array<string|int, mixed>
Return values
array<string|int, mixed> —has()
{@inheritdoc}
public
has(string $id) : bool
Parameters
- $id : string
Return values
bool —createCircularReferenceException()
private
createCircularReferenceException(string $id, array<string|int, mixed> $path) : ContainerExceptionInterface
Parameters
- $id : string
- $path : array<string|int, mixed>
Return values
ContainerExceptionInterface —createNotFoundException()
private
createNotFoundException(string $id) : NotFoundExceptionInterface
Parameters
- $id : string