PauseCommand
class PauseCommand extends Command
Traits
Properties
| protected Factory|null | $components | The console components factory. |
from InteractsWithIO |
| protected InputInterface|null | $input | The input interface implementation. |
from InteractsWithIO |
| protected OutputStyle|null | $output | The output interface implementation. |
from InteractsWithIO |
| protected int | $verbosity | The default verbosity of output commands. |
from InteractsWithIO |
| protected array<string, int> | $verbosityMap | The mapping between human-readable verbosity levels and Symfony's OutputInterface. |
from InteractsWithIO |
| protected SignalRegistry|null | $signalRegistry | The signal registry instance. |
from InteractsWithSignals |
| static protected array | $macros | The registered string macros. |
from Macroable |
| protected string|null | $signature | The console command name. |
|
| protected string|null | $name | The console command name. |
from Command |
| protected string | $description | The console command description. |
|
| protected string | $help | The console command help text. |
from Command |
| $hidden | Indicates whether the command should be shown in the Artisan command list. |
from Command | |
| protected bool | $isolated | Indicates whether only one instance of the command can run at any given time. |
from Command |
| protected int | $isolatedExitCode | The default exit code for isolated commands. |
from Command |
| protected string[] | $aliases | The console command name aliases. |
from Command |
| protected bool | $coroutine | Whether to execute in a coroutine environment. |
from Command |
| protected Dispatcher|null | $eventDispatcher | The event dispatcher instance. |
from Command |
| protected int | $hookFlags | The hook flags for the coroutine. |
from Command |
| protected int | $exitCode | The exit code of the command. |
from Command |
| protected Application|null | $hypervel | The Hypervel application instance. |
from Command |
Methods
Resolve the console command instance for the given command.
Call another console command.
Call another console command without output.
Call another console command without output.
Run the given console command.
Create an input instance from the given arguments.
Prompt the user until the given validation callback passes.
Validate the given prompt value using the validator.
Get the validator instance that should be used to validate prompts.
Get the validation messages that should be used during prompt validation.
Get the validation attributes that should be used during prompt validation.
Add the disable event dispatcher option to the command.
Disable or enable the event dispatcher based on the input option.
Retrieve the command's input as a CommandInput instance or retrieve an input item.
Determine whether the argument is defined in the command signature.
Determine whether the option is defined in the command signature.
Confirm a question with the user.
Prompt the user for input.
Prompt the user for input with auto completion.
Prompt the user for input with auto completion.
Prompt the user for input but hide the answer from the console.
Give the user a single choice from an array of answers.
Format input to textual table.
Execute a given callback while advancing a progress bar.
Write a string as information output.
Write a string as standard output.
Write a string as comment output.
Write a string as question output.
Write a string as error output.
Write a string as warning output.
Write a string in an alert box.
Get the output component factory implementation.
Get the verbosity level in terms of Symfony's OutputInterface level.
Define a callback to be run when the given signal(s) occurs.
Unregister signal handlers for one, many, or all signals.
Interact with the user before validating the input.
Prompt the user for any missing arguments.
Prompt for missing input arguments using the returned questions.
Perform actions after the user was prompted for missing arguments.
Determine whether the input contains any options that differ from the default values.
Mix another object into the class.
Dynamically handle calls to the class.
Dynamically handle calls to the class.
Configure argument/option defaults that can't be expressed as static signature text (e.g. environment-dependent values, or non-string literal defaults such as booleans or integers), by patching the already-built definition.
Configure usage examples for the command from class attributes.
Configure the console command using a fluent definition.
Execute the console command.
Execute one command handler lifecycle.
Get a command isolation mutex instance for the command.
Set up the traits used by the command.
Parse the queue argument into connection and queue name.
Details
in
CallsCommands at line 18
abstract protected Command
resolveCommand(Command|string $command)
Resolve the console command instance for the given command.
in
CallsCommands at line 23
int
call(Command|string $command, array $arguments = [])
Call another console command.
in
CallsCommands at line 31
int
callSilent(Command|string $command, array $arguments = [])
Call another console command without output.
in
CallsCommands at line 39
int
callSilently(Command|string $command, array $arguments = [])
Call another console command without output.
in
CallsCommands at line 47
protected int
runCommand(Command|string $command, array $arguments, OutputInterface $output)
Run the given console command.
in
CallsCommands at line 64
protected ArrayInput
createInputFromArguments(array $arguments)
Create an input instance from the given arguments.
in
CallsCommands at line 78
protected array
context()
Get all the context passed to the command.
in
ConfiguresPrompts at line 34
protected void
configurePrompts(InputInterface $input)
Configure the prompt fallbacks.
in
ConfiguresPrompts at line 185
protected PResult
promptUntilValid(PResult $prompt, bool|string $required, null|PResult): mixed $validate)
Prompt the user until the given validation callback passes.
in
ConfiguresPrompts at line 252
protected ?string
validatePrompt(mixed $value, mixed $rules)
Validate the given prompt value using the validator.
in
ConfiguresPrompts at line 287
protected Validator
getPromptValidatorInstance(mixed $field, mixed $value, mixed $rules, array $messages = [], array $attributes = [])
Get the validator instance that should be used to validate prompts.
in
ConfiguresPrompts at line 302
protected array
validationMessages()
Get the validation messages that should be used during prompt validation.
in
ConfiguresPrompts at line 312
protected array
validationAttributes()
Get the validation attributes that should be used during prompt validation.
in
DisableEventDispatcher at line 17
void
addDisableDispatcherOption()
Add the disable event dispatcher option to the command.
in
DisableEventDispatcher at line 25
void
disableDispatcher(InputInterface $input)
Disable or enable the event dispatcher based on the input option.
in
HasParameters at line 18
protected void
specifyParameters()
Specify the arguments and options on the command.
in
HasParameters at line 51
protected array
getArguments()
Get the console command arguments.
in
HasParameters at line 68
protected array
getOptions()
Get the console command options.
in
InteractsWithIO at line 63
mixed
input(string|null $key = null, mixed $default = null)
Retrieve the command's input as a CommandInput instance or retrieve an input item.
in
InteractsWithIO at line 73
bool
hasArgument(int|string $name)
Determine whether the argument is defined in the command signature.
in
InteractsWithIO at line 83
mixed
argument(string|null $key = null)
Get the value of a command argument.
in
InteractsWithIO at line 95
array
arguments()
Get all of the arguments passed to the command.
in
InteractsWithIO at line 103
bool
hasOption(string $name)
Determine whether the option is defined in the command signature.
in
InteractsWithIO at line 113
mixed
option(string|null $key = null)
Get the value of a command option.
in
InteractsWithIO at line 125
array
options()
Get all of the options passed to the command.
in
InteractsWithIO at line 133
bool
confirm(string $question, bool $default = false)
Confirm a question with the user.
in
InteractsWithIO at line 141
mixed
ask(string $question, string|null $default = null)
Prompt the user for input.
in
InteractsWithIO at line 151
mixed
anticipate(string $question, iterable|callable $choices, string|null $default = null)
Prompt the user for input with auto completion.
in
InteractsWithIO at line 161
mixed
askWithCompletion(string $question, iterable|callable $choices, string|null $default = null)
Prompt the user for input with auto completion.
in
InteractsWithIO at line 175
mixed
secret(string $question, bool $fallback = true)
Prompt the user for input but hide the answer from the console.
in
InteractsWithIO at line 190
array|string
choice(string $question, array $choices, int|string|null $default = null, int|null $attempts = null, bool $multiple = false)
Give the user a single choice from an array of answers.
in
InteractsWithIO at line 204
void
table(array $headers, array|Arrayable $rows, string|TableStyle $tableStyle = 'default', array $columnStyles = [])
Format input to textual table.
in
InteractsWithIO at line 232
mixed
withProgressBar(iterable|int $totalSteps, Closure $callback)
Execute a given callback while advancing a progress bar.
in
InteractsWithIO at line 262
void
info(string $string, int|string|null $verbosity = null)
Write a string as information output.
in
InteractsWithIO at line 270
void
line(string $string, string|null $style = null, int|string|null $verbosity = null)
Write a string as standard output.
in
InteractsWithIO at line 280
void
comment(string $string, int|string|null $verbosity = null)
Write a string as comment output.
in
InteractsWithIO at line 288
void
question(string $string, int|string|null $verbosity = null)
Write a string as question output.
in
InteractsWithIO at line 296
void
error(string $string, int|string|null $verbosity = null)
Write a string as error output.
in
InteractsWithIO at line 304
void
warn(string $string, int|string|null $verbosity = null)
Write a string as warning output.
in
InteractsWithIO at line 318
void
alert(string $string, int|string|null $verbosity = null)
Write a string in an alert box.
in
InteractsWithIO at line 332
InteractsWithIO
newLine(int $count = 1)
Write a blank line.
in
InteractsWithIO at line 342
void
setInput(InputInterface $input)
Set the input interface implementation.
in
InteractsWithIO at line 350
void
setOutput(OutputStyle $output)
Set the output interface implementation.
in
InteractsWithIO at line 358
OutputStyle|null
getOutput()
Get the output implementation.
in
InteractsWithIO at line 366
Factory|null
outputComponents()
Get the output component factory implementation.
in
InteractsWithIO at line 374
protected void
setVerbosity(int|string $level)
Set the verbosity level.
in
InteractsWithIO at line 382
protected int
parseVerbosity(int|string|null $level = null)
Get the verbosity level in terms of Symfony's OutputInterface level.
in
InteractsWithSignals at line 27
void
trap(Closure|int|iterable $signals, callable $callback)
Define a callback to be run when the given signal(s) occurs.
in
InteractsWithSignals at line 42
void
untrap(int|iterable|null $signals = null)
Unregister signal handlers for one, many, or all signals.
in
PromptsForMissingInput at line 23
protected void
interact(InputInterface $input, OutputInterface $output)
Interact with the user before validating the input.
in
PromptsForMissingInput at line 35
protected void
promptForMissingArguments(InputInterface $input, OutputInterface $output)
Prompt the user for any missing arguments.
in
PromptsForMissingInput at line 74
protected array
promptForMissingArgumentsUsing()
Prompt for missing input arguments using the returned questions.
in
PromptsForMissingInput at line 82
protected void
afterPromptingForMissingArguments(InputInterface $input, OutputInterface $output)
Perform actions after the user was prompted for missing arguments.
in
PromptsForMissingInput at line 89
protected bool
didReceiveOptions(InputInterface $input)
Determine whether the input contains any options that differ from the default values.
in
Macroable at line 28
static void
macro(string $name, callable|object $macro)
Register a custom macro.
Boot-only. Macros persist in a static property for the worker lifetime and apply to every subsequent call on the macroable class.
in
Macroable at line 41
static void
mixin(object $mixin, bool $replace = true)
Mix another object into the class.
Boot-only. Delegates to macro() for each method; registered macros persist in a static property for the worker lifetime.
in
Macroable at line 57
static bool
hasMacro(string $name)
Check if macro is registered.
in
Macroable at line 68
static void
flushMacros()
Flush the existing macros.
Boot or tests only. Clears worker-wide macros; concurrent coroutines may resolve different methods depending on timing.
in
Macroable at line 78
static mixed
__callStatic(string $method, array $parameters)
Dynamically handle calls to the class.
in
Macroable at line 103
mixed
__call(string $method, array $parameters)
Dynamically handle calls to the class.
in
Command at line 116
__construct(string|null $name = null)
No description
in
Command at line 172
protected void
configureDefaults()
Configure argument/option defaults that can't be expressed as static signature text (e.g. environment-dependent values, or non-string literal defaults such as booleans or integers), by patching the already-built definition.
in
Command at line 179
int
run(InputInterface $input, OutputInterface $output)
Run the console command.
in
Command at line 202
protected void
configureIsolation()
Configure the console command for isolation.
in
Command at line 216
protected void
configureFromAttributes()
Configure the command from class attributes.
in
Command at line 258
protected void
configureUsageFromAttribute()
Configure usage examples for the command from class attributes.
in
Command at line 270
protected void
configureUsingFluentDefinition()
Configure the console command using a fluent definition.
in
Command at line 286
protected int
execute(InputInterface $input, OutputInterface $output)
Execute the console command.
in
Command at line 386
protected int
executeCommand(InputInterface $input, OutputInterface $output)
Execute one command handler lifecycle.
Invocation-wide coroutine entry, isolation, AfterExecute dispatch, and ordinary throwable propagation remain owned by execute().
in
Command at line 422
protected int
normalizeExitCode(int $exitCode)
Normalize the command exit code.
in
Command at line 430
protected CommandMutex
commandIsolationMutex()
Get a command isolation mutex instance for the command.
in
Command at line 440
protected void
replaceOutput()
Replace the command output with the configured output style.
in
Command at line 452
never
fail(string|Throwable|null $exception = null)
Fail the command manually.
in
Command at line 494
bool
isHidden()
Determine if the command is hidden.
in
Command at line 514
Application
getHypervel()
Get the Hypervel application instance.
in
Command at line 526
void
setHypervel(Application $hypervel)
Set the Hypervel application instance.
in
Command at line 534
protected array
setUpTraits(InputInterface $input, OutputInterface $output)
Set up the traits used by the command.
in
Command at line 550
static void
flushState()
Flush all static state.
in
ParsesQueue at line 14
protected array
parseQueue(string $queue)
Parse the queue argument into connection and queue name.
at line 34
int
handle(Factory $manager)
Execute the console command.