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
string
command 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.
string
command 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.
string
null
command argument key
mixed
default value if there is no value specified in the key
mixed
command 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
string
null
path key
mixed
default value if there is no value specified in the key
mixed
valuegetOpt(string|null $key= null
, mixed $default= null
) : mixed
If no key is specified, all command options are returned.
string
null
command option key
mixed
default value if there is no value specified in the key
mixed
command optionshandleError(\Exception $e) : void
If you need to customize the handling of errors, please override it with subclasses.
\Exception
errors
\Exception |
---|
lockTime() : integer
The default is 24 hours. If you need to customize, please override it with subclasses.
integer
lock timelogLevel() : integer
The default is Log::LEVEL_DEBUG. If you need to customize, please override it with subclasses.
see | \Kore\Log |
---|
integer
log level$args : \Kore\array<string>
array()
$command : string
$lockManager : \Kore\LockManager
$opts : \Kore\array<string>
array()