DevCommand
class DevCommand
Constants
| PRIORITY_DEFAULT |
The priority level for default commands that are registered by the framework. |
| PRIORITY_VENDOR |
The priority level for commands that are registered by packages in the vendor directory. |
| PRIORITY_USERLAND |
The priority level for commands that are registered by the user in their application. |
Properties
| protected string|null | $color | Color of the command when output to the console. |
Methods
Create a new DevCommand instance.
Derive the name from a command string.
Get the command name.
Get the command priority.
Set the command color.
Set the command color to blue.
Set the command color to purple.
Set the command color to pink.
Set the command color to orange.
Set the command color to green.
Set the command color to yellow.
Get the command as an array.
Details
at line 35
__construct(string $command, array $source, string|null $name = null, int $priority = self::PRIORITY_USERLAND)
Create a new DevCommand instance.
at line 47
static string
nameFromCommand(string $command)
Derive the name from a command string.
at line 55
string
name()
Get the command name.
at line 63
int
priority()
Get the command priority.
at line 71
DevCommand
color(string $color)
Set the command color.
at line 81
DevCommand
blue()
Set the command color to blue.
at line 89
DevCommand
purple()
Set the command color to purple.
at line 97
DevCommand
pink()
Set the command color to pink.
at line 105
DevCommand
orange()
Set the command color to orange.
at line 113
DevCommand
green()
Set the command color to green.
at line 121
DevCommand
yellow()
Set the command color to yellow.
at line 131
array
toArray()
Get the command as an array.