class Prompter (View source)

The Prompter class.

Methods

static boolean
boolean(string $msg = '', mixed $default = null)

boolean

static string
text(string $msg = '', mixed $default = null)

text

static string
callback(string $msg = '', callable $handler = null, mixed $default = null, string $noValidMessage = null, int $attemptTimes = 3, bool $failCloseMessage = false)

callback

static string
validText(string $msg = '', array $options = array(), mixed $default = null, string $noValidMessage = null, int $attemptTimes = 3, bool $failCloseMessage = false)

validText

static string
notNullText(string $msg = '', mixed $default = null, string $noValidMessage = null, int $attemptTimes = 3, bool $failCloseMessage = false)

notNullText

static string
selector(string $msg = '', array $options = array(), mixed $default = null, string $noValidMessage = null, int $attemptTimes = 3, bool $failCloseMessage = false)

selector

static string
password(string $msg, mixed $default = null, string $noValidMessage = null, int $attemptTimes = 3, bool $failCloseMessage = false)

password

Details

at line line 26
static boolean boolean(string $msg = '', mixed $default = null)

boolean

Parameters

string $msg
mixed $default

Return Value

boolean

at line line 41
static string text(string $msg = '', mixed $default = null)

text

Parameters

string $msg
mixed $default

Return Value

string

at line line 60
static string callback(string $msg = '', callable $handler = null, mixed $default = null, string $noValidMessage = null, int $attemptTimes = 3, bool $failCloseMessage = false)

callback

Parameters

string $msg
callable $handler
mixed $default
string $noValidMessage
int $attemptTimes
bool $failCloseMessage

Return Value

string

at line line 84
static string validText(string $msg = '', array $options = array(), mixed $default = null, string $noValidMessage = null, int $attemptTimes = 3, bool $failCloseMessage = false)

validText

Parameters

string $msg
array $options
mixed $default
string $noValidMessage
int $attemptTimes
bool $failCloseMessage

Return Value

string

at line line 107
static string notNullText(string $msg = '', mixed $default = null, string $noValidMessage = null, int $attemptTimes = 3, bool $failCloseMessage = false)

notNullText

Parameters

string $msg
mixed $default
string $noValidMessage
int $attemptTimes
bool $failCloseMessage

Return Value

string

at line line 129
static string selector(string $msg = '', array $options = array(), mixed $default = null, string $noValidMessage = null, int $attemptTimes = 3, bool $failCloseMessage = false)

selector

Parameters

string $msg
array $options
mixed $default
string $noValidMessage
int $attemptTimes
bool $failCloseMessage

Return Value

string

at line line 152
static string password(string $msg, mixed $default = null, string $noValidMessage = null, int $attemptTimes = 3, bool $failCloseMessage = false)

password

Parameters

string $msg
mixed $default
string $noValidMessage
int $attemptTimes
bool $failCloseMessage

Return Value

string