Containable
Table of Contents
Properties
Methods
- __construct() : mixed
- getOrDefault() : mixed
- Get a value from the container or return a default value
- getOrFail() : mixed
- getSilently() : mixed
- set() : void
- Set a value in the container
- contextHas() : bool
Properties
$context
Application container context
public
ContainerInterface|Container|null
$context
Methods
__construct()
public
__construct([ContainerInterface|Container|null $context = null ]) : mixed
Parameters
- $context : ContainerInterface|Container|null = null
getOrDefault()
Get a value from the container or return a default value
public
getOrDefault(string $key, mixed $default) : mixed
Parameters
- $key : string
- $default : mixed
getOrFail()
public
getOrFail(mixed $key) : mixed
Parameters
- $key : mixed
Tags
getSilently()
public
getSilently(mixed $key) : mixed
Parameters
- $key : mixed
set()
Set a value in the container
public
set(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
contextHas()
protected
contextHas(string $key) : bool
Parameters
- $key : string