|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
Namespaces | |
| namespace | core |
Functions | |
| cli_input ($prompt, $default='', array $options=null, $casesensitiveoptions=false) | |
| cli_get_params (array $longoptions, array $shortmapping=null) | |
| cli_separator ($return=false) | |
| cli_heading ($string, $return=false) | |
| cli_problem ($text) | |
| cli_error ($text, $errorcode=1) | |
| cli_error | ( | $ | text, |
| $ | errorcode = 1 |
||
| ) |
Write to standard out and error with exit in error.
| string | $text | |
| int | $errorcode |
Definition at line 173 of file clilib.php.

| cli_get_params | ( | array $ | longoptions, |
| array $ | shortmapping = null |
||
| ) |
Returns cli script parameters.
| array | $longoptions | array of --style options ex:('verbose'=>false) |
| array | $shortmapping | array describing mapping of short to long style options ex:('h'=>'help', 'v'=>'verbose') |
Definition at line 63 of file clilib.php.
| cli_heading | ( | $ | string, |
| $ | return = false |
||
| ) |
Print or return section heading string
| string | $string | text |
| bool | $return | false means print, true return as string |
Definition at line 148 of file clilib.php.

Get input from user
| string | $prompt | text prompt, should include possible options |
| string | $default | default value when enter pressed |
| array | $options | list of allowed options, empty means any text |
| bool | $casesensitive | true if options are case sensitive |
Definition at line 37 of file clilib.php.
| cli_problem | ( | $ | text | ) |
| cli_separator | ( | $ | return = false | ) |
Print or return section separator string
| bool | $return | false means print, true return as string |
Definition at line 133 of file clilib.php.
