Menu

## ValueDefinition
in package
implements Definition, SelfResolvingDefinition

ValueDefinition.php : 14

Definition of a value for dependency injection.

##### Tags

author

  Matthieu Napoli matthieu@mnapoli.fr

### Table of Contents

#### Interfaces

Definition
SelfResolvingDefinition
  Describes a definition that can resolve itself.

#### Properties

$name : string
  Entry name.
$value : mixed

#### Methods

__construct() : mixed
__toString() : string
getName() : string
getValue() : mixed
isResolvable() : bool
  Check if a definition can be resolved.
replaceNestedDefinitions() : void
resolve() : mixed
  Resolve the definition and return the resulting value.
setName() : void

### Properties

#### $name

ValueDefinition.php : 19

Entry name.

`private string $name = ''`

#### $value

ValueDefinition.php : 22
`private mixed $value`

### Methods

#### __construct()

ValueDefinition.php : 21
`public __construct(mixed $value) : mixed`

##### Parameters

$value : mixed

#### __toString()

ValueDefinition.php : 56
`public __toString() : string`

##### Return values

string

#### getName()

ValueDefinition.php : 26
`public getName() : string`

##### Return values

string

#### getValue()

ValueDefinition.php : 36
`public getValue() : mixed`

#### isResolvable()

ValueDefinition.php : 46

Check if a definition can be resolved.

`public isResolvable(ContainerInterface $container) : bool`

##### Parameters

$container : ContainerInterface

##### Return values

bool

#### replaceNestedDefinitions()

ValueDefinition.php : 51
`public replaceNestedDefinitions(callable $replacer) : void`

##### Parameters

$replacer : callable

#### resolve()

ValueDefinition.php : 41

Resolve the definition and return the resulting value.

`public resolve(ContainerInterface $container) : mixed`

##### Parameters

$container : ContainerInterface

#### setName()

ValueDefinition.php : 31
`public setName(string $name) : void`

##### Parameters

$name : string

## Search results