Dispatcher
class Dispatcher
Command dispatcher.
Traits
Properties
protected Container | $container | Container. |
Methods
Returns the string that resembles the provided string the most.
Resolves the command.
Checks for invalid arguments or options.
Checks for missing required arguments or options.
Checks for missing required arguments.
Checks for missing required options.
Checks arguments and options.
Converts arguments to camel case.
Dispatches the command.
Details
in SuggestionTrait at line 27
protected string|null
suggest(string $string, array $alternatives)
Returns the string that resembles the provided string the most.
NULL is returned if no string with a similarity of 66% or more is found.
at line 50
__construct(Container $container)
Constructor.
at line 61
protected CommandInterface
resolve(string $command)
Resolves the command.
at line 75
protected
checkForInvalidArguments(CommandInterface $command, array $providedArguments, array $globalOptions)
Checks for invalid arguments or options.
at line 103
protected
checkForMissingArgumentsOrOptions(array $commandArguments, array $providedArguments, string $exception)
Checks for missing required arguments or options.
at line 124
protected
checkForMissingArguments(CommandInterface $command, array $providedArguments)
Checks for missing required arguments.
at line 135
protected
checkForMissingOptions(CommandInterface $command, array $providedArguments)
Checks for missing required options.
at line 147
protected
checkArgumentsAndOptions(CommandInterface $command, array $providedArguments, array $globalOptions)
Checks arguments and options.
at line 165
protected array
convertArgumentsToCamelCase(array $arguments)
Converts arguments to camel case.
at line 180
protected mixed
execute(CommandInterface $command, array $arguments)
Executes the command.
at line 193
int
dispatch(string $command, array $arguments, array $globalOptions)
Dispatches the command.