v1.0.0
English

CLI.php

system/CLI/CLI.php
1 class 38 methods

class CLI

Set of static methods useful for CLI request handling. Portions of this code were initially from the FuelPHP Framework, version 1.7.x, and used here under the MIT license they were originally made available under. Reference: http://fuelphp.com Some of the code in this class is Windows-specific, and not possible to test using travis-ci. It has been phpunit-annotated to prevent messing up code coverage.
init () public
input (?string $prefix = null) public
prompt (string $field, $options = null, $validation = null) public
promptByKey ($text, array $options, $validation = null) public
promptByMultipleKeys (string $text, array $options) public
isZeroOptions (array $options) private
printKeysAndValues (array $options) private
validate (string $field, string $value, $rules) protected
string (string $text = '', ?string $foreground = null, ?string $background = null) public
write (string $text = '', ?string $foreground = null, ?string $background = null) public
error (string $text, string $foreground = 'light_red', ?string $background = null) public
beep (int $num = 1) public
wait (int $seconds, bool $countdown = false) public
isWindows () public
newLine (int $num = 1) public
clearScreen () public
color (string $text, string $foreground, ?string $background = null, ?string $format = null) public
getColoredText (string $text, string $foreground, ?string $background, ?string $format) private
strlen (?string $string) public
streamSupports (string $function, $resource) public
hasColorSupport ($resource) public
getWidth (int $default = 80) public
getHeight (int $default = 32) public
generateDimensions () public
showProgress ($thisStep = 1, int $totalSteps = 10) public
wrap (?string $string = null, int $max = 0, int $padLeft = 0) public
void (&$line) public
parseCommandLine () protected
getURI () public
getSegment (int $index) public
getSegments () public
getOption (string $name) public
getOptions () public
getOptionString (bool $useLongOpts = false, bool $trim = false) public
table (array $tbody, array $thead = []) public
fwrite ($handle, string $string) protected
setInputOutput (InputOutput $io) public
resetInputOutput () public
phpDG v1.0.0 CLI.php 662 files 498 classes 763 fn
Generated