Menu

## Containable

Containable.php : 10

### Table of Contents

#### Properties

$context : ContainerInterface|Container|null
  Application container context

#### 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

Containable.php : 20

Application container context

`public ContainerInterface|Container|null $context`

### Methods

#### __construct()

Containable.php : 12
`public __construct([ContainerInterface|Container|null $context = null ]) : mixed`

##### Parameters

$context : ContainerInterface|Container|null = null

#### getOrDefault()

Containable.php : 51

Get a value from the container or return a default value

`public getOrDefault(string $key, mixed $default) : mixed`

##### Parameters

$key : string
$default : mixed

#### getOrFail()

Containable.php : 60
`public getOrFail(mixed $key) : mixed`

##### Parameters

$key : mixed

##### Tags

throws
  ContainerExceptionInterface
throws
  NotFoundExceptionInterface

#### getSilently()

Containable.php : 36
`public getSilently(mixed $key) : mixed`

##### Parameters

$key : mixed

#### set()

Containable.php : 31

Set a value in the container

`public set(string $name, mixed $value) : void`

##### Parameters

$name : string
$value : mixed

#### contextHas()

Containable.php : 23
`protected contextHas(string $key) : bool`

##### Parameters

$key : string

##### Return values

bool

## Search results