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