Fallback
trait Fallback
Constants
| protected SHOULD_FALLBACK_CONTEXT_KEY |
Context key for the fallback condition. |
| protected FALLBACKS_CONTEXT_KEY |
Context key for the fallback implementations. |
Properties
| static protected bool | $shouldFallback | Whether to fallback to a custom implementation. |
|
| static protected array<class-string, Closure(static): mixed> | $fallbacks | The fallback implementations. |
Methods
static void
fallbackWhen(bool $condition)
Enable the fallback implementation.
static bool
shouldFallback()
Whether the prompt should fallback to a custom implementation.
static void
mixed
fallback()
Call the registered fallback implementation.
static void
resetFallback()
Reset fallback state to defaults.
Details
at line 39
static void
fallbackWhen(bool $condition)
Enable the fallback implementation.
at line 52
static bool
shouldFallback()
Whether the prompt should fallback to a custom implementation.
at line 69
static void
fallbackUsing(Closure $fallback)
Set the fallback implementation.
at line 83
mixed
fallback()
Call the registered fallback implementation.
at line 107
static void
resetFallback()
Reset fallback state to defaults.
Boot or tests only. Clears worker-wide prompt fallback configuration; concurrent prompts may render with different fallback behavior depending on timing.