BindTrait

trait BindTrait

Methods

$this bind(string $nameOrFqcn, mixed $valueOrRef)

Sets bindings.

Details

final $this bind(string $nameOrFqcn, mixed $valueOrRef)

Sets bindings.

Bindings map $named or FQCN arguments to values that should be injected in the matching parameters (of the constructor, of methods called and of controller actions).

Parameters

string $nameOrFqcn A parameter name with its "$" prefix, or a FQCN
mixed $valueOrRef The value or reference to bind

Return Value

$this