PHP Class Webmozart\Console\Resolver\ResolveResult

Since: 1.0
Author: Bernhard Schussek ([email protected])
显示文件 Open project: webmozart/console Class Usage Examples

Public Methods

Method Description
__construct ( Command $command, Webmozart\Console\Api\Args\RawArgs $rawArgs ) Creates a new resolved command.
getCommand ( ) : Command Returns the command.
getParseError ( ) : Webmozart\Console\Api\Args\CannotParseArgsException Returns the error that happened during argument parsing.
getParsedArgs ( ) : Args Returns the parsed console arguments.
getRawArgs ( ) : Webmozart\Console\Api\Args\RawArgs The raw console arguments.
isParsable ( ) : boolean Returns whether the console arguments can be parsed.

Private Methods

Method Description
parse ( )

Method Details

__construct() public method

Creates a new resolved command.
public __construct ( Command $command, Webmozart\Console\Api\Args\RawArgs $rawArgs )
$command Webmozart\Console\Api\Command\Command The command.
$rawArgs Webmozart\Console\Api\Args\RawArgs The raw console arguments.

getCommand() public method

Returns the command.
public getCommand ( ) : Command
return Webmozart\Console\Api\Command\Command The command.

getParseError() public method

Returns the error that happened during argument parsing.
public getParseError ( ) : Webmozart\Console\Api\Args\CannotParseArgsException
return Webmozart\Console\Api\Args\CannotParseArgsException The parse error or `null` if the arguments were parsed successfully.

getParsedArgs() public method

Returns the parsed console arguments.
public getParsedArgs ( ) : Args
return Webmozart\Console\Api\Args\Args The parsed console arguments or `null` if the console arguments cannot be parsed.

getRawArgs() public method

The raw console arguments.
public getRawArgs ( ) : Webmozart\Console\Api\Args\RawArgs
return Webmozart\Console\Api\Args\RawArgs The raw console arguments.

isParsable() public method

Returns whether the console arguments can be parsed.
public isParsable ( ) : boolean
return boolean Returns `true` if the console arguments can be parsed and `false` if a parse error occurred.