Method | Description | |
---|---|---|
__construct ( string $question, mixed $default = null ) | 构造方法 | |
getAutocompleterValues ( ) : null | array | Traversable | 获取自动完成 | |
getDefault ( ) : mixed | 获取默认答案 | |
getMaxAttempts ( ) : null | integer | 获取最大重试次数 | |
getNormalizer ( ) : string | Closure | 获取响应回调 The normalizer can ba a callable (a string), a closure or a class implementing __invoke. | |
getQuestion ( ) : string | 获取问题 | |
getValidator ( ) : null | callable | 获取验证器 | |
isHidden ( ) : boolean | 是否隐藏答案 | |
isHiddenFallback ( ) : boolean | 不能被隐藏是否撤销 | |
setAutocompleterValues ( null | array | Traversable $values ) : |
设置自动完成的值 | |
setHidden ( boolean $hidden ) : |
隐藏答案 | |
setHiddenFallback ( boolean $fallback ) : |
设置不能被隐藏的时候的操作 | |
setMaxAttempts ( null | integer $attempts ) : |
设置最大重试次数 | |
setNormalizer ( string | Closure $normalizer ) : |
设置响应的回调 | |
setValidator ( null | callable $validator ) : |
设置答案的验证器 |
Method | Description | |
---|---|---|
isAssoc ( $array ) |
public __construct ( string $question, mixed $default = null ) | ||
$question | string | 问题 |
$default | mixed | 默认答案 |
public getAutocompleterValues ( ) : null | array | Traversable | ||
return | null | array | Traversable |
public getMaxAttempts ( ) : null | integer | ||
return | null | integer |
public getNormalizer ( ) : string | Closure | ||
return | string | Closure |
public setAutocompleterValues ( null | array | Traversable $values ) : |
||
$values | null | array | Traversable | |
return |
public setHiddenFallback ( boolean $fallback ) : |
||
$fallback | boolean | |
return |
public setMaxAttempts ( null | integer $attempts ) : |
||
$attempts | null | integer | |
return |
public setNormalizer ( string | Closure $normalizer ) : |
||
$normalizer | string | Closure | |
return |
public setValidator ( null | callable $validator ) : |
||
$validator | null | callable | |
return | The current instance |