Documentation

BindTrait

Table of Contents

bind()  : $this
Sets bindings.

Methods

bind()

Sets bindings.

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

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
$nameOrFqcn : string

A parameter name with its "$" prefix, or an FQCN

$valueOrRef : mixed

The value or reference to bind

Return values
$this

Search results