Fr3nch13/CakePHP Utilities

ContainerInterface extends DefinitionContainerInterface

Interface for the Dependency Injection Container in CakePHP applications

This interface extends the PSR-11 container interface and adds methods to add services and service providers to the container.

The methods defined in this interface use the conventions provided by league/container as that is the library that CakePHP uses.

Table of Contents

Methods

add()  : DefinitionInterface
addServiceProvider()  : self
addShared()  : DefinitionInterface
extend()  : DefinitionInterface
get()  : mixed
Finds an entry of the container by its identifier and returns it.
getNew()  : mixed
has()  : bool
Returns true if the container can return an entry for the given identifier.
inflector()  : InflectorInterface

Methods

has()

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

public has(string $id) : bool

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
$id : string

Identifier of the entry to look for.

Return values
bool

        
On this page

Search results