$checklist = new ConsoleKit\Widgets\Checklist($console);
$checklist->run(array(
'Creating directory structure' => function() {
code
return $success; // bool
},
'Downloading scripts' => function() {
code
return $success; // bool
}
));
Will print:
Creating directory structure OK
Downloading scripts OK
显示文件
Open project: maximebf/consolekit
Class Usage Examples
Property | Type | Description | |
---|---|---|---|
$errorColor | |||
$errorText | |||
$maxMessageLength | |||
$successColor | |||
$successText |
Method | Description | |
---|---|---|
getMaxMessageLength ( ) | ||
run ( array $steps ) | ||
runArray ( $array, $message, $callback, $useKeyInMessage = false ) | ||
setErrorText ( $text, $color = Colors::RED ) | ||
setMaxMessageLength ( $length ) | ||
setSuccessText ( $text, $color = Colors::GREEN ) | ||
step ( $message, $callback, $maxMessageLength = null ) |