Appearance
CliInput
php
final readonly class PPTXenigma\CliInputThe words of the command line, sorted into the options that have a value, the flags and the files.
Source: src/CliInput.php
Methods
__construct()
php
public function __construct(array $values = [], array $files = [])| Parameter | Description |
|---|---|
$values | the value of each option, and true for each flag |
parse()
php
public static function parse(array $arguments): self| Parameter | Description |
|---|---|
$arguments | the arguments, without the name of the script |
Throws InvalidArgumentException when an option is not known
enum()
php
public function enum(string $enum, string $name, BackedEnum $backedEnum): BackedEnumReturns T
Throws InvalidArgumentException when the value is not one of the cases
has()
php
public function has(string $name): booltext()
php
public function text(string $name): string