ContextualBindingBuilder
in package
implements
ContextualBindingBuilder
Interfaces, Classes and Traits
Table of Contents
- $concrete : string
- The concrete instance.
- $container : Container
- The underlying container instance.
- $needs : string
- The abstract target.
- __construct() : void
- Create a new contextual binding builder.
- give() : void
- Define the implementation for the contextual binding.
- needs() : $this
- Define the abstract target that depends on the context.
Properties
$concrete
The concrete instance.
protected
string
$concrete
$container
The underlying container instance.
protected
Container
$container
$needs
The abstract target.
protected
string
$needs
Methods
__construct()
Create a new contextual binding builder.
public
__construct(Container $container, string $concrete) : void
Parameters
- $container : Container
- $concrete : string
Return values
void —give()
Define the implementation for the contextual binding.
public
give(Closure|string $implementation) : void
Parameters
- $implementation : Closure|string
Return values
void —needs()
Define the abstract target that depends on the context.
public
needs(string $abstract) : $this
Parameters
- $abstract : string