Parser
in package
Table of Contents
Methods
- parse() : array<string|int, mixed>
- Parse the given console command definition into an array.
- extractDescription() : array<string|int, mixed>
- Parse the token into its token and description segments.
- name() : string
- Extract the name of the command from the expression.
- parameters() : array<string|int, mixed>
- Extract all parameters from the tokens.
- parseArgument() : InputArgument
- Parse an argument expression.
- parseOption() : InputOption
- Parse an option expression.
Methods
parse()
Parse the given console command definition into an array.
public
static parse(string $expression) : array<string|int, mixed>
Parameters
- $expression : string
Tags
Return values
array<string|int, mixed>extractDescription()
Parse the token into its token and description segments.
protected
static extractDescription(string $token) : array<string|int, mixed>
Parameters
- $token : string
Return values
array<string|int, mixed>name()
Extract the name of the command from the expression.
protected
static name(string $expression) : string
Parameters
- $expression : string
Tags
Return values
stringparameters()
Extract all parameters from the tokens.
protected
static parameters(array<string|int, mixed> $tokens) : array<string|int, mixed>
Parameters
- $tokens : array<string|int, mixed>
Return values
array<string|int, mixed>parseArgument()
Parse an argument expression.
protected
static parseArgument(string $token) : InputArgument
Parameters
- $token : string
Return values
InputArgumentparseOption()
Parse an option expression.
protected
static parseOption(string $token) : InputOption
Parameters
- $token : string