class BindWhen

Define a binding selected by a boot-stable condition.

A matching condition becomes a normal worker-lifetime container binding.

Properties

class-string $concrete

The concrete class to bind to.

Container): bool $condition

The condition that determines if the binding should apply.

Methods

__construct(string $concrete, Closure $condition)

Create a new attribute instance.

Details

at line 39
__construct(string $concrete, Closure $condition)

Create a new attribute instance.

Parameters

string $concrete
Closure $condition