Documentation

Inject
in package

FinalYes

#[Inject] attribute.

Marks a property or method as an injection point

Tags
author

Matthieu Napoli matthieu@mnapoli.fr

Attributes
#[Attribute]
\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::TARGET_PARAMETER

Table of Contents

Properties

$name  : string|null
Entry name.
$parameters  : array<string|int, mixed>
Parameters, indexed by the parameter number (index) or name.

Methods

__construct()  : mixed
getName()  : string|null
getParameters()  : array<string|int, mixed>

Properties

$name

Entry name.

private string|null $name = null

$parameters

Parameters, indexed by the parameter number (index) or name.

private array<string|int, mixed> $parameters = []

Used if the attribute is set on a method

Methods

__construct()

public __construct([string|array<string|int, mixed>|null $name = null ]) : mixed
Parameters
$name : string|array<string|int, mixed>|null = null
Tags
throws
InvalidAttribute

getName()

public getName() : string|null
Return values
string|null

Name of the entry to inject

getParameters()

public getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>

Parameters, indexed by the parameter number (index) or name


        
On this page

Search results