Menu

## Parser
in package

Parser.php : 10

### 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()

Parser.php : 20

Parse the given console command definition into an array.

`public static parse(string $expression) : array<string|int, mixed>`

##### Parameters

$expression : string

##### Tags

throws
  InvalidArgumentException

##### Return values

array<string|int, mixed>

#### extractDescription()

Parser.php : 125

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()

Parser.php : 39

Extract the name of the command from the expression.

`protected static name(string $expression) : string`

##### Parameters

$expression : string

##### Tags

throws
  InvalidArgumentException

##### Return values

string

#### parameters()

Parser.php : 54

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()

Parser.php : 77

Parse an argument expression.

`protected static parseArgument(string $token) : InputArgument`

##### Parameters

$token : string

##### Return values

InputArgument

#### parseOption()

Parser.php : 97

Parse an option expression.

`protected static parseOption(string $token) : InputOption`

##### Parameters

$token : string

##### Return values

InputOption

## Search results