메소드 | 설명 | |
---|---|---|
getConfig ( ) : array | Get command config array | |
getOutputter ( ) : Console_CommandLine_Outputter | Get CLI outputter | |
getParseResult ( ) : Console_CommandLine_Result | Get parsed result object | |
out ( string $str ) : Phrozn\Runner\CommandLine\Callback | Output string to stdout (flushes output). Wrapper around Outputter | |
readLine ( ) : string | Read-line either from STDIN or mock unit test data | |
setConfig ( array $config ) : Phrozn\Runner\CommandLine\Callback | Set config data for a given callback | |
setOutputter ( $out ) : Phrozn\Runner\CommandLine\Callback | Set CLI outputter | |
setParseResult ( Console_CommandLine_Result $result ) : Phrozn\Runner\CommandLine\Callback | Result object of CLI input parsing | |
setUnitTestData ( $data ) : Phrozn\Runner\CommandLine\Callback | Since Unit Testing readline can be tricky, confirm answer is exposed to unit test via this method. Simply pass the string you want to be used in place of readline() result. |
메소드 | 설명 | |
---|---|---|
combine ( string $file, boolean $verbose = false ) : string | Combine command documentation | |
getFooter ( ) : string | Phrozn CLI footer | |
getHeader ( ) : string | Phrozn CLI header | |
getPathArgument ( string $name, boolean $realpath = true, Console_CommandLine_Result $command = null ) : string | Extract path argument or fallback to cwd | |
isAbsolute ( string $path ) : boolean | See whether given path is absolute or relative | |
pad ( $str ) | ||
pre ( array $arr ) : string | Prepend all lines in array with intendation |
메소드 | 설명 | |
---|---|---|
getCommandMeta ( ) | ||
getRealCommandName ( string $file ) : string | Search if an alias exists for this command | |
useAnsiColors ( ) |
public getOutputter ( ) : Console_CommandLine_Outputter | ||
리턴 | Console_CommandLine_Outputter | CLI outputter instance |
public getParseResult ( ) : Console_CommandLine_Result | ||
리턴 | Console_CommandLine_Result |
protected isAbsolute ( string $path ) : boolean | ||
$path | string | Path to check |
리턴 | boolean |
public setOutputter ( $out ) : Phrozn\Runner\CommandLine\Callback | ||
리턴 | Phrozn\Runner\CommandLine\Callback |
public setParseResult ( Console_CommandLine_Result $result ) : Phrozn\Runner\CommandLine\Callback | ||
$result | Console_CommandLine_Result | Parser's result |
리턴 | Phrozn\Runner\CommandLine\Callback |
public setUnitTestData ( $data ) : Phrozn\Runner\CommandLine\Callback | ||
리턴 | Phrozn\Runner\CommandLine\Callback |