Menu

## ParameterResolver
in package

ParameterResolver.php : 19

Resolves parameters for a function call.

##### Tags

since
  4.2
author

  Matthieu Napoli matthieu@mnapoli.fr

### Table of Contents

#### Properties

$definitionResolver : DefinitionResolver

#### Methods

__construct() : mixed
resolveParameters() : array<string|int, mixed>
getFunctionName() : string
getParameterDefaultValue() : mixed
  Returns the default value of a function parameter.

### Properties

#### $definitionResolver

ParameterResolver.php : 25
`private DefinitionResolver $definitionResolver`

### Methods

#### __construct()

ParameterResolver.php : 24
`public __construct(DefinitionResolver $definitionResolver) : mixed`

##### Parameters

$definitionResolver : DefinitionResolver

  Will be used to resolve nested definitions.

#### resolveParameters()

ParameterResolver.php : 33
`public resolveParameters([MethodInjection|null $definition = null ][, ReflectionMethod|null $method = null ][, array<string|int, mixed> $parameters = [] ]) : array<string|int, mixed>`

##### Parameters

$definition : MethodInjection|null = null
$method : ReflectionMethod|null = null
$parameters : array<string|int, mixed> = []

##### Tags

throws
  InvalidDefinition

  A parameter has no value defined or guessable.

##### Return values

array<string|int, mixed> —

Parameters to use to call the function.

#### getFunctionName()

ParameterResolver.php : 102
`private getFunctionName(ReflectionMethod $method) : string`

##### Parameters

$method : ReflectionMethod

##### Return values

string

#### getParameterDefaultValue()

ParameterResolver.php : 88

Returns the default value of a function parameter.

`private getParameterDefaultValue(ReflectionParameter $parameter, ReflectionMethod $function) : mixed`

##### Parameters

$parameter : ReflectionParameter
$function : ReflectionMethod

##### Tags

throws
  InvalidDefinition

  Can't get default values from PHP internal classes and functions

## Search results