|
Zhamao Framework
3.0.0-beta1
A high-performance chatbot + web framework
|
Public 成员函数 | |
| __construct (public string $name, public string $description='', string $type='string', public bool $required=false, public string $prompt='', public string $default='', public int $timeout=60, public int $error_prompt_policy=1) | |
| getTypeErrorPrompt () | |
| getErrorQuitPrompt () | |
Public 成员函数 继承自 AnnotationBase | |
| __toString () | |
| on (\Closure|callable|string $method) | |
| getIterator () | |
| isInGroup (string $name) | |
| addGroup (string $name) | |
| getGroups () | |
成员变量 | |
| string | $type = 'string' |
成员变量 继承自 AnnotationBase | |
| Closure string array | $method = '' |
| $class = '' | |
| array | $group = [] |
Protected 成员函数 | |
| fixTypeName (string $type) | |
Class CommandArgument @Annotation @NamedArgumentConstructor() @Target("ALL")
| __construct | ( | public string | $name, |
| public string | $description = '', |
||
| string | $type = 'string', |
||
| public bool | $required = false, |
||
| public string | $prompt = '', |
||
| public string | $default = '', |
||
| public int | $timeout = 60, |
||
| public int | $error_prompt_policy = 1 |
||
| ) |
| string | $name | 参数名称(可以是中文) |
| string | $description | 参数描述(默认为空) |
| bool | $required | 参数是否必需,如果是必需,为true(默认为false) |
| string | $prompt | 当参数为必需且缺失时,返回给用户的提示输入的消息(默认为"请输入$name") |
| string | $default | 当required为false时,未匹配到参数将自动使用default值(默认为空) |
| int | $timeout | prompt超时时间(默认为60秒) |
| InvalidArgumentException|ZMKnownException |
| $name | @Required() |
|
protected |
| ZMKnownException |
| getErrorQuitPrompt | ( | ) |
| getTypeErrorPrompt | ( | ) |
| string $type = 'string' |