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.
Показать файл
Открыть проект
Защищенные свойства (Protected)
Открытые методы
Описание методов
Note: magic methods declared in class PHPDOC
__construct()
публичный Метод
Note: magic properties declared in class PHPDOC
getDefaultSpec()
публичный Метод
getDescription()
публичный Метод
getSpec()
публичный Метод
isRequired()
публичный Метод
setDescription()
публичный Метод
useAsInfile()
публичный Метод
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.
useAsOutfile()
публичный Метод
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 |
|
$required защищенное свойство
protected bool $required |
Результат |
boolean |
|
$spec защищенное свойство
protected array $spec |
Результат |
array |
|