PHP 클래스 MrClay\Cli\Arg
By default, the argument will be assumed to be an optional letter flag with no value following.
If the argument may receive a value, call mayHaveValue(). If there's whitespace after the
flag, the value will be returned as true instead of the string.
If the argument MUST be accompanied by a value, call mustHaveValue(). In this case, whitespace
is permitted between the flag and its value.
Use assertFile() or assertDir() to indicate that the argument must return a string value
specifying a file or directory. During validation, the value will be resolved to a
full file/dir path (not necessarily existing!) and the original value will be accessible
via a "*.raw" key. E.g. $cli->values['f.raw']
Use assertReadable()/assertWritable() to cause the validator to test the file/dir for
read/write permissions respectively.
파일 보기
프로젝트 열기: mrclay/minify
보호된 프로퍼티들
공개 메소드들
메소드 상세
Note: magic methods declared in class PHPDOC
Note: magic properties declared in class PHPDOC
Assert that the argument's value points to a readable file. When
Cli::openInput() is called, a read pointer to this file will
be provided.
Assert that the argument's value points to a writable file. When
Cli::openOutput() is called, a write pointer to this file will
be provided.
프로퍼티 상세
$description 보호되어 있는 프로퍼티
protected string $description |
리턴 |
string |
|
protected bool $required |
리턴 |
boolean |
|
protected array $spec |
리턴 |
array |
|