Input is the base class for all concrete Input classes.
Three concrete classes are provided by default:
-
ArgvInput
: The input comes from the CLI arguments (argv) -
StringInput
: The input is provided as a string -
ArrayInput
: The input is provided as an array
- author Fabien Potencier
Abstract
Methods |
public __construct(?Symfony |
public bind(Symfony |
public escapeToken(string $token) : string Escapes a token through escapeshellarg if it contains unsafe chars. |
public getArgument(string $name) : ?mixed |
public getArguments() : array |
public getOption(string $name) : ?mixed |
public getOptions() : array |
public getStream()
|
public hasArgument(string $name) : bool |
public hasOption(string $name) : bool |
public isInteractive() : bool |
public setArgument(string $name, ?mixed $value) : void |
public setInteractive(bool $interactive) : void |
public setOption(string $name, ?mixed $value) : void |
public setStream( $stream) : void
|
public validate() : void |
Properties |
protected array $arguments = [] |
protected Symfony |
protected bool $interactive = true |
protected array $options = [] |
protected $stream = NULL
|
Methods |
protected abstract parse() : void Processes command line arguments. |