add state and ctrl+C support for windows

This commit is contained in:
crazywhalecc
2022-09-26 22:44:41 +08:00
parent cf3f09600b
commit a4f992b9e5
14 changed files with 143 additions and 108 deletions

View File

@@ -22,45 +22,23 @@ use ZM\Exception\ZMKnownException;
class CommandArgument extends AnnotationBase implements ErgodicAnnotation
{
/**
* @var string
* @Required()
*/
public $name;
public string $name;
/**
* @var string
*/
public $description = '';
public string $description = '';
/**
* @var string
*/
public $type = 'string';
public string $type = 'string';
/**
* @var bool
*/
public $required = false;
public bool $required = false;
/**
* @var string
*/
public $prompt = '';
public string $prompt = '';
/**
* @var string
*/
public $default = '';
public string $default = '';
/**
* @var int
*/
public $timeout = 60;
public int $timeout = 60;
/**
* @var int
*/
public $error_prompt_policy = 1;
public int $error_prompt_policy = 1;
/**
* @param string $name 参数名称(可以是中文)