ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Psr\Container\ContainerInterface Interface Reference

Describes the interface of a container that exposes methods to read its entries. More...

+ Inheritance diagram for Psr\Container\ContainerInterface:
+ Collaboration diagram for Psr\Container\ContainerInterface:

Public Member Functions

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

Detailed Description

Describes the interface of a container that exposes methods to read its entries.

Definition at line 11 of file ContainerInterface.php.

Member Function Documentation

◆ get()

Psr\Container\ContainerInterface::get (   $id)

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

Parameters
string$idIdentifier of the entry to look for.
Exceptions
NotFoundExceptionInterfaceNo entry was found for this identifier.
ContainerExceptionInterfaceError while retrieving the entry.
Returns
mixed Entry.

Implemented in Slim\Container.

◆ has()

Psr\Container\ContainerInterface::has (   $id)

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

Returns false otherwise.

has($id) returning true does not mean that get($id) will not throw an exception. It does however mean that get($id) will not throw a NotFoundExceptionInterface.

Parameters
string$idIdentifier of the entry to look for.
Returns
bool

Implemented in Slim\Container.


The documentation for this interface was generated from the following file: