Documentation

ServiceLocator
in package
implements ServiceProviderInterface Uses ServiceLocatorTrait

Tags
author

Robin Chalas robin.chalas@gmail.com

author

Nicolas Grekas p@tchwork.com

Interfaces, Classes and Traits

ServiceProviderInterface
A ServiceProviderInterface exposes the identifiers and the types of services provided by a container.

Table of Contents

$container  : mixed
$externalId  : mixed
$factories  : mixed
$loading  : mixed
$providedTypes  : mixed
__construct()  : mixed
__invoke()  : mixed
get()  : mixed
{@inheritdoc}
getProvidedServices()  : array<string|int, mixed>
{@inheritdoc}
has()  : bool
{@inheritdoc}
createCircularReferenceException()  : ContainerExceptionInterface
createNotFoundException()  : NotFoundExceptionInterface
formatAlternatives()  : string

Properties

Methods

__construct()

public __construct(array<string|int, callable> $factories) : mixed
Parameters
$factories : array<string|int, callable>
Return values
mixed

__invoke()

public __invoke(string $id) : mixed
Parameters
$id : string
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

formatAlternatives()

private formatAlternatives([array<string|int, mixed>|null $alternatives = null ][, string $separator = 'and' ]) : string
Parameters
$alternatives : array<string|int, mixed>|null = null
$separator : string = 'and'
Return values
string

Search results