class Parser

Methods

static array
parse(string $expression)

Parse the given console command definition into an array.

static string
name(string $expression)

Extract the name of the command from the expression.

static array
parameters(array $tokens)

Extract all of the parameters from the tokens.

static InputArgument
parseArgument(string $token)

Parse an argument expression.

static InputOption
parseOption(string $token)

Parse an option expression.

static array
extractDescription(string $token)

Parse the token into its token and description segments.

Details

at line 20
static array parse(string $expression)

Parse the given console command definition into an array.

Parameters

string $expression

Return Value

array

Exceptions

InvalidArgumentException

at line 39
static protected string name(string $expression)

Extract the name of the command from the expression.

Parameters

string $expression

Return Value

string

at line 58
static protected array parameters(array $tokens)

Extract all of the parameters from the tokens.

Parameters

array $tokens

Return Value

array

at line 81
static protected InputArgument parseArgument(string $token)

Parse an argument expression.

Parameters

string $token

Return Value

InputArgument

at line 105
static protected InputOption parseOption(string $token)

Parse an option expression.

Parameters

string $token

Return Value

InputOption

at line 136
static protected array extractDescription(string $token)

Parse the token into its token and description segments.

Parameters

string $token

Return Value

array