Method | Description | |
---|---|---|
ask ( string $question, boolean $isHidden = false, string $default = '', boolean $displayDefault = true ) : string | 提问并获取用户输入 | |
confirm ( string $question, array $choices = ['Y', 'n'], string $answer = 'y', string $default = 'y', string $errorMessage = 'Invalid choice' ) : boolean | 确认对话框 |
Method | Description | |
---|---|---|
askHidden ( ) : string | 隐藏输入如密码等 | |
getShell ( ) : string | boolean | Returns a valid unix shell. | |
hasSttyAvailable ( ) : boolean | stty是否可用 |
if($dialog->confirm('Are you sure?')) { ... }
if($dialog->confirm('Your choice?', null, ['a', 'b', 'c'])) { ... }