Fr3nch13/CakePHP Utilities

ReflectionContainer
in package
implements ArgumentResolverInterface, ContainerInterface uses ArgumentResolverTrait, ContainerAwareTrait

Table of Contents

Interfaces

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

Properties

$cache  : array<string|int, mixed>
$cacheResolutions  : bool
$container  : DefinitionContainerInterface|null

Methods

__construct()  : mixed
call()  : mixed
get()  : mixed
Finds an entry of the container by its identifier and returns it.
getContainer()  : DefinitionContainerInterface
has()  : bool
Returns true if the container can return an entry for the given identifier.
reflectArguments()  : array<string|int, mixed>
resolveArguments()  : array<string|int, mixed>
setContainer()  : ContainerAwareInterface

Properties

Methods

__construct()

public __construct([bool $cacheResolutions = false ]) : mixed
Parameters
$cacheResolutions : bool = false

call()

public call(callable $callable[, array<string|int, mixed> $args = [] ]) : mixed
Parameters
$callable : callable
$args : array<string|int, mixed> = []

get()

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

public get(mixed $id[, array<string|int, mixed> $args = [] ]) : mixed
Parameters
$id : mixed

Identifier of the entry to look for.

$args : array<string|int, mixed> = []
Return values
mixed

Entry.

has()

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

public has(mixed $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 : mixed

Identifier of the entry to look for.

Return values
bool

reflectArguments()

public reflectArguments(ReflectionFunctionAbstract $method[, array<string|int, mixed> $args = [] ]) : array<string|int, mixed>
Parameters
$method : ReflectionFunctionAbstract
$args : array<string|int, mixed> = []
Return values
array<string|int, mixed>

resolveArguments()

public resolveArguments(array<string|int, mixed> $arguments) : array<string|int, mixed>
Parameters
$arguments : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results