trait AliasTrait

Methods

register(string|array $keyOrData, callable|null $data = null)

Alias for bind.

set(string|array $keyOrData, callable|null $data = null)

Alias for bind.

mixed
resolve(string $key)

Fetches from container with getContent.

bool
contains(string $key)

Alias for has.

mixed
__get(string $key)

Allow retrieving container values via magic properties.

bool
__isset(string $key)

Allows the use of isset() to determine if something exists in the container.

void
__unset(string $key)

Allows the use of unset() to remove key a key from the container.

mixed
__call(string $key, array $data)

Bind a new key or fetch an existing one if no argument is provided.

Details

at line 17
AliasTrait register(string|array $keyOrData, callable|null $data = null)

Alias for bind.

Parameters

string|array $keyOrData
callable|null $data

Return Value

AliasTrait

at line 30
AliasTrait set(string|array $keyOrData, callable|null $data = null)

Alias for bind.

Parameters

string|array $keyOrData
callable|null $data

Return Value

AliasTrait

at line 42
mixed resolve(string $key)

Fetches from container with getContent.

Parameters

string $key

Return Value

mixed

at line 54
bool contains(string $key)

Alias for has.

Parameters

string $key

Return Value

bool

at line 66
mixed __get(string $key)

Allow retrieving container values via magic properties.

Parameters

string $key

Return Value

mixed

at line 78
bool __isset(string $key)

Allows the use of isset() to determine if something exists in the container.

Parameters

string $key

Return Value

bool

at line 90
void __unset(string $key)

Allows the use of unset() to remove key a key from the container.

Parameters

string $key

Return Value

void

at line 104
mixed __call(string $key, array $data)

Bind a new key or fetch an existing one if no argument is provided.

. If an argument is provided: Only the first one will be considered and it must be a callable.

Parameters

string $key
array $data

Return Value

mixed