Command class
| package | Default |
|---|
handleShutdown() : void
If you need to customize the handling of shutdown, please override it with subclasses.
| codeCoverageIgnore |
|---|
main(string $command, \Kore\array<string> $args, \Kore\array<string> $opts) : void
stringcommand namespace
\Kore\array<string>command arguments
\Kore\array<string>command options
commandName() : string
The default is the end of the command namespace. If you need to customize, please override it with subclasses.
stringcommand nameexec() : void
The process is implemented in subclasses.
getArg(string|null $key= null, mixed $default= null) : mixed
If no key is specified, all command arguments are returned.
stringnullcommand argument key
mixeddefault value if there is no value specified in the key
mixedcommand argumentsgetFromArray(\Kore\array<mixed> $array, string|null $key= null, mixed $default= null) : mixed
If no key is specified, array is returned.
\Kore\array<mixed>array
stringnullpath key
mixeddefault value if there is no value specified in the key
mixedvaluegetOpt(string|null $key= null, mixed $default= null) : mixed
If no key is specified, all command options are returned.
stringnullcommand option key
mixeddefault value if there is no value specified in the key
mixedcommand optionshandleError(\Exception $e) : void
If you need to customize the handling of errors, please override it with subclasses.
\Exceptionerrors
\Exception |
|---|
lockTime() : integer
The default is 24 hours. If you need to customize, please override it with subclasses.
integerlock timelogLevel() : integer
The default is Log::LEVEL_DEBUG. If you need to customize, please override it with subclasses.
| see | \Kore\Log |
|---|
integerlog level$args : \Kore\array<string>
array()$command : string
$lockManager : \Kore\LockManager
$opts : \Kore\array<string>
array()