TYPO3
7.6
|
Public Member Functions | |
__construct () | |
cli_getArgArray ($option, $argv) | |
cli_isArg ($option) | |
cli_argValue ($option, $idx=0) | |
cli_getArgIndex (array $argv=array()) | |
cli_validateArgs () | |
cli_setArguments (array $argv=array()) | |
cli_keyboardInput () | |
cli_keyboardInput_yes ($msg= '') | |
cli_echo ($string= '', $force=false) | |
cli_help () | |
cli_indent ($str, $indent) | |
Public Attributes | |
$cli_args = array() | |
$cli_options | |
$cli_help | |
$stdin = null | |
TYPO3 cli script basis
Definition at line 20 of file CommandLineController.php.
__construct | ( | ) |
Constructor Make sure child classes also call this!
Definition at line 62 of file CommandLineController.php.
References CommandLineController\cli_setArguments().
cli_argValue | ( | $option, | |
$idx = 0 |
|||
) |
Return argument value
string | $option | Option string, eg. "-s |
int | $idx | Value index, default is 0 (zero) = the first one... |
Definition at line 105 of file CommandLineController.php.
Referenced by AdminCommand\cli_main(), CleanFlexformCommand\main(), DeletedRecordsCommand\main(), VersionsCommand\main(), OrphanRecordsCommand\main(), and LostFilesCommand\main().
cli_echo | ( | $string = '' , |
|
$force = false |
|||
) |
Echos strings to shell, but respective silent-modes
string | $string | The string |
bool | $force | If string should be written even if -s is set (-ss will subdue it!) |
Definition at line 226 of file CommandLineController.php.
References elseif.
Referenced by CommandLineController\cli_help(), AdminCommand\cli_main(), and CleanerCommand\cli_main().
cli_getArgArray | ( | $option, | |
$argv | |||
) |
Finds the arg token (like "-s") in argv and returns the rest of argv from that point on. This should only be used in special cases since this->cli_args should already be prepared with an index of values!
string | $option | Option string, eg. "-s |
array | $argv | Input argv array |
Definition at line 76 of file CommandLineController.php.
cli_getArgIndex | ( | array | $argv = array() | ) |
Will parse "_SERVER[argv]" into an index of options and values Argument names (eg. "-s") will be keys and values after (eg. "-s value1 value2 ..." or "-s=value1") will be in the array. Array is empty if no values
array | $argv | Configuration options |
Definition at line 118 of file CommandLineController.php.
References CommandLineController\$cli_options.
Referenced by CommandLineController\cli_setArguments().
cli_help | ( | ) |
Prints help-output from ->cli_help array
Definition at line 246 of file CommandLineController.php.
References CommandLineController\cli_echo(), and CommandLineController\cli_indent().
Referenced by CleanFlexformCommand\__construct(), OrphanRecordsCommand\__construct(), SyslogCommand\__construct(), DeletedRecordsCommand\__construct(), VersionsCommand\__construct(), DoubleFilesCommand\__construct(), LostFilesCommand\__construct(), MissingFilesCommand\__construct(), MissingRelationsCommand\__construct(), AdminCommand\__construct(), RteImagesCommand\__construct(), CleanerCommand\__construct(), AdminCommand\cli_main(), CleanerCommand\cli_main(), SyslogCommand\main(), DeletedRecordsCommand\main(), CleanFlexformCommand\main(), VersionsCommand\main(), OrphanRecordsCommand\main(), DoubleFilesCommand\main(), MissingFilesCommand\main(), MissingRelationsCommand\main(), LostFilesCommand\main(), and RteImagesCommand\main().
cli_indent | ( | $str, | |
$indent | |||
) |
Indentation function for 75 char wide lines.
string | $str | String to break and indent. |
int | $indent | Number of space chars to indent. |
Definition at line 289 of file CommandLineController.php.
Referenced by CommandLineController\cli_help().
cli_isArg | ( | $option | ) |
Return TRUE if option is found
string | $option | Option string, eg. "-s |
Definition at line 93 of file CommandLineController.php.
Referenced by CleanerCommand\cli_main(), CleanFlexformCommand\main(), DeletedRecordsCommand\main(), VersionsCommand\main(), and VersionsCommand\main_autoFix().
cli_keyboardInput | ( | ) |
Asks stdin for keyboard input and returns the line (after enter is pressed)
Definition at line 195 of file CommandLineController.php.
Referenced by CommandLineController\cli_keyboardInput_yes().
cli_keyboardInput_yes | ( | $msg = '' | ) |
Asks for Yes/No from shell and returns TRUE if "y" or "yes" is found as input.
string | $msg | String to ask before... |
Definition at line 212 of file CommandLineController.php.
References CommandLineController\cli_keyboardInput().
Referenced by CleanerCommand\cli_main().
cli_setArguments | ( | array | $argv = array() | ) |
Set environment array to $cli_args
array | $argv | Configuration options |
Definition at line 185 of file CommandLineController.php.
References CommandLineController\cli_getArgIndex().
Referenced by CommandLineController\__construct(), and CleanerCommand\cli_main().
cli_validateArgs | ( | ) |
Validates if the input arguments in this->cli_args are all listed in this->cli_options and if not, will exit with an error.
Definition at line 146 of file CommandLineController.php.
References CommandLineController\$cli_args.
Referenced by AdminCommand\cli_main(), and CleanerCommand\cli_main().
$cli_args = array() |
Definition at line 27 of file CommandLineController.php.
Referenced by CommandLineController\cli_validateArgs().
Definition at line 41 of file CommandLineController.php.
$cli_options |
Definition at line 32 of file CommandLineController.php.
Referenced by CommandLineController\cli_getArgIndex().
$stdin = null |
Definition at line 54 of file CommandLineController.php.