Menu

## ReflectionBasedAutowiring
in package
implements DefinitionSource, Autowiring

ReflectionBasedAutowiring.php : 17

Reads DI class definitions using reflection.

##### Tags

author

  Matthieu Napoli matthieu@mnapoli.fr

### Table of Contents

#### Interfaces

DefinitionSource
  Source of definitions for entries of the container.
Autowiring
  Source of definitions for entries of the container.

#### Methods

autowire() : ObjectDefinition|null
  Autowire the given definition.
getDefinition() : ObjectDefinition|null
  Returns the DI definition for the entry name.
getDefinitions() : array<string, Definition>
  Autowiring cannot guess all existing definitions.
getParametersDefinition() : array<string|int, mixed>
  Read the type-hinting from the parameters of the function.

### Methods

#### autowire()

ReflectionBasedAutowiring.php : 19

Autowire the given definition.

`public autowire(string $name[, ObjectDefinition|null $definition = null ]) : ObjectDefinition|null`

##### Parameters

$name : string
$definition : ObjectDefinition|null = null

##### Return values

ObjectDefinition|null

#### getDefinition()

ReflectionBasedAutowiring.php : 40

Returns the DI definition for the entry name.

`public getDefinition(string $name) : ObjectDefinition|null`

##### Parameters

$name : string

##### Return values

ObjectDefinition|null

#### getDefinitions()

ReflectionBasedAutowiring.php : 48

Autowiring cannot guess all existing definitions.

`public getDefinitions() : array<string, Definition>`

##### Return values

array<string, Definition> —

Definitions indexed by their name.

#### getParametersDefinition()

ReflectionBasedAutowiring.php : 56

Read the type-hinting from the parameters of the function.

`private getParametersDefinition(ReflectionFunctionAbstract $constructor) : array<string|int, mixed>`

##### Parameters

$constructor : ReflectionFunctionAbstract

##### Return values

array<string|int, mixed>

## Search results