Documentation

ContainerInterface

PSR-11 compatible container interface.

This interface follows the PSR-11 ContainerInterface specification.

Tags
since
3.0.0

Table of Contents

Methods

get()  : mixed
Finds an entry of the container by its identifier and returns it.
has()  : bool
Returns true if the container can return an entry for the given identifier.

Methods

get()

Finds an entry of the container by its identifier and returns it.

public get(string $id) : mixed
Parameters
$id : string

Identifier of the entry to look for

Tags
throws
NotFoundException

No entry was found for this identifier

throws
ContainerException

Error while retrieving the entry

Return values
mixed

Entry

has()

Returns true if the container can return an entry for the given identifier.

public has(string $id) : bool
Parameters
$id : string

Identifier of the entry to look for

Return values
bool

        
On this page

Search results