Documentation

ContextualBindingBuilder
in package
implements ContextualBindingBuilder

Interfaces, Classes and Traits

ContextualBindingBuilder

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

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
Return values
$this

Search results