프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$debug | array | ||
$errors | validation errors | ||
$isHelpRequest | The user wants help info | ||
$moreArgs | array | ||
$values | option values available after validation. E.g. array( 'a' => false // option was missing ,'b' => true // option was present ,'c' => "Hello" // option had value ,'f' => "/home/user/file" // file path from root ,'f.raw' => "~/file" // file path as given to option ) |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_args | |||
$_stdin | resource | ||
$_stdout | resource |
메소드 | 설명 | |
---|---|---|
__construct ( boolean $exitIfNoStdin = true ) | ||
addArgument ( string $letter, boolean $required, |
||
addOptionalArg ( |
||
addRequiredArg ( |
||
closeInput ( ) | ||
closeOutput ( ) | ||
getArgument ( string $letter ) : |
||
getArgumentsListing ( ) : string | ||
getErrorReport ( ) : string | Get a short list of errors with options | |
getPathArgs ( ) : array | Get the full paths of file(s) passed in as unspecified arguments | |
openInput ( ) : resource | Get resource of open input stream. May be STDIN or a file pointer to the file specified by an option with 'STDIN'. | |
openOutput ( ) : resource | Get resource of open output stream. May be STDOUT or a file pointer to the file specified by an option with 'STDOUT'. The file will be truncated to 0 bytes on opening. | |
validate ( ) | * Read and validate options |
메소드 | 설명 | |
---|---|---|
addError ( string $letter, string $msg, string $value = null ) |
public __construct ( boolean $exitIfNoStdin = true ) | ||
$exitIfNoStdin | boolean | (default true) Exit() if STDIN is not defined |
public addArgument ( string $letter, boolean $required, |
||
$letter | string | |
$required | boolean | |
$arg | ||
리턴 |
public addOptionalArg ( |
||
$letter | ||
리턴 |
public addRequiredArg ( |
||
$letter | ||
리턴 |
public getArgument ( string $letter ) : |
||
$letter | string | |
리턴 |
public getErrorReport ( ) : string | ||
리턴 | string |
public getPathArgs ( ) : array | ||
리턴 | array |
public openInput ( ) : resource | ||
리턴 | resource |
public openOutput ( ) : resource | ||
리턴 | resource |