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 |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/DependencyInjection/Loader/Configurator/Traits/BindTrait.html