Public Member Functions | |
| FF_CLI ($in_app= 'fastframe') | |
| & | singleton () |
| writeln ($text= '', $pre=false) | |
| indent ($text) | |
| bold ($text) | |
| red ($text) | |
| green ($text) | |
| blue ($text) | |
| yellow ($text) | |
| message ($message, $type= 'cli.message') | |
| fatal ($error) | |
| prompt ($prompt, $choices=null) | |
| init () | |
| runningFromCLI () | |
Public Attributes | |
| $_console | |
| $_newline | |
| $_indent | |
| $_bold_start = '' | |
| $_bold_end = '' | |
| $_red_start = '' | |
| $_green_start = '' | |
| $_yellow_start = '' | |
| $_blue_start = '' | |
| $_red_end = '' | |
| $_green_end = '' | |
| $_yellow_end = '' | |
| $_blue_end = '' | |
Definition at line 48 of file CLI.php.
|
|
Constructor. Detects the current environment (web server or console) and sets internal values accordingly.
Definition at line 110 of file CLI.php. References $o_registry, $term, init(), runningFromCLI(), and FF_Registry::singleton(). Referenced by singleton(). |
|
|
Returns a blue version of $text.
Definition at line 260 of file CLI.php. Referenced by message(). |
|
|
Returns a bold version of $text.
Definition at line 221 of file CLI.php. Referenced by prompt(). |
|
|
Displays a fatal error message.
Definition at line 317 of file CLI.php. References writeln(). |
|
|
Returns a green version of $text.
Definition at line 247 of file CLI.php. Referenced by message(). |
|
|
Returns the indented string.
|
|
|
CLI scripts shouldn't timeout, so try to set the time limit to none. Also initialize a few variables in $_SERVER that aren't present from the CLI. static Definition at line 386 of file CLI.php. Referenced by FF_CLI(). |
|
||||||||||||
|
Displays a message.
|
|
||||||||||||
|
Prompts for a user response.
|
|
|
Returns a red version of $text.
Definition at line 234 of file CLI.php. Referenced by message(). |
|
|
Make sure we're being called from the command line, and not via the web. static
Definition at line 409 of file CLI.php. Referenced by FF_CLI(). |
|
|
Returns a single instance of the FF_CLI class. Definition at line 171 of file CLI.php. References FF_CLI(). |
|
||||||||||||
|
Prints $text on a single line.
|
|
|
Returns a yellow version of $text.
Definition at line 273 of file CLI.php. Referenced by message(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The strings to mark the end of coloured text. |
|
|
The strings to mark the beginning of coloured text. |
|
|
|
|
|
|
1.4.4