class ContextualBindingBuilder implements ContextualBindingBuilder (View source)
protected Container | $container | The underlying container instance. | |
protected string|array | $concrete | The concrete instance. | |
protected string | $needs | The abstract target. |
void | __construct(Container $container, string|array $concrete) Create a new contextual binding builder. | |
$this | needs(string $abstract) Define the abstract target that depends on the context. | |
void | give(Closure|string $implementation) Define the implementation for the contextual binding. | |
void | giveTagged(string $tag) Define tagged services to be used as the implementation for the contextual binding. |
Create a new contextual binding builder.
Define the abstract target that depends on the context.
Define the implementation for the contextual binding.
Define tagged services to be used as the implementation for the contextual binding.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Container/ContextualBindingBuilder.html