PHP Class Webmozart\Console\Api\Event\PreResolveEvent

Add a listener for this event to customize the command used for the given console arguments.
Since: 1.0
Author: Bernhard Schussek ([email protected])
Inheritance: extends Symfony\Component\EventDispatcher\Event
ファイルを表示 Open project: webmozart/console Class Usage Examples

Public Methods

Method Description
__construct ( Webmozart\Console\Api\Args\RawArgs $rawArgs, Webmozart\Console\Api\Application\Application $application ) Creates the event.
getApplication ( ) : Webmozart\Console\Api\Application\Application Returns the application.
getRawArgs ( ) : Webmozart\Console\Api\Args\RawArgs Returns the raw console arguments.
getResolvedCommand ( ) : ResolvedCommand Returns the resolved command.
setResolvedCommand ( ResolvedCommand $resolvedCommand = null ) Sets the resolved command.

Method Details

__construct() public method

Creates the event.
public __construct ( Webmozart\Console\Api\Args\RawArgs $rawArgs, Webmozart\Console\Api\Application\Application $application )
$rawArgs Webmozart\Console\Api\Args\RawArgs The raw console arguments.
$application Webmozart\Console\Api\Application\Application The application.

getApplication() public method

Returns the application.
public getApplication ( ) : Webmozart\Console\Api\Application\Application
return Webmozart\Console\Api\Application\Application The application.

getRawArgs() public method

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

getResolvedCommand() public method

Returns the resolved command.
public getResolvedCommand ( ) : ResolvedCommand
return Webmozart\Console\Api\Resolver\ResolvedCommand Returns the resolved command or `null` if none was set.

setResolvedCommand() public method

Sets the resolved command.
public setResolvedCommand ( ResolvedCommand $resolvedCommand = null )
$resolvedCommand Webmozart\Console\Api\Resolver\ResolvedCommand The resolved command. Set to `null` to let the configured resolver decide.