class
Illuminate
/
Container
/
ContextualBindingBuilder
ContextualBindingBuilder
Implements
Properties
protected
$concrete string|array
The concrete instance.
Default: null
protected
$needs string
The abstract target.
Default: null
Methods
public
__construct ( Container $container , $concrete ) : void
Create a new contextual binding builder.
Parameters
- $container Container
- $concrete string|array
public
needs ( $abstract ) : $this
Define the abstract target that depends on the context.
Parameters
- $abstract string
public
give ( $implementation ) : void
Define the implementation for the contextual binding.
Parameters
- $implementation Closure |string|array
public
giveTagged ( $tag ) : void
Define tagged services to be used as the implementation for the contextual binding.
Parameters
- $tag string
public
giveConfig ( $key , $default ) : void
Specify the configuration item to bind as a primitive.
Parameters
- $key string
- $default mixed