trait Interactivity

Constants

protected INTERACTIVE_CONTEXT_KEY

Context key for the interactive mode override.

Properties

static protected bool|null $interactive

Whether to render the prompt interactively.

Methods

static void
interactive(bool $interactive = true)

Set interactive mode.

static bool|null
isInteractive()

Determine if the prompt is interactive.

static void
resetInteractivity()

Reset interactivity state to defaults.

mixed
default()

Return the default value if it passes validation.

Details

at line 28
static void interactive(bool $interactive = true)

Set interactive mode.

Parameters

bool $interactive

Return Value

void

at line 40
static bool|null isInteractive()

Determine if the prompt is interactive.

Return Value

bool|null

at line 56
static void resetInteractivity()

Reset interactivity state to defaults.

Boot or tests only. Clears worker-wide prompt interactivity configuration; concurrent prompts may render with different interactivity depending on timing.

Return Value

void

at line 65
protected mixed default()

Return the default value if it passes validation.

Return Value

mixed