PHP Class Webmozart\Console\ConsoleApplication

Since: 1.0
Author: Bernhard Schussek ([email protected])
Inheritance: implements Webmozart\Console\Api\Application\Application
Show file Open project: webmozart/console Class Usage Examples

Public Methods

Method Description
__construct ( ApplicationConfig | callable $config ) Creates a new console application.
getCommand ( $name )
getCommands ( )
getConfig ( )
getDefaultCommands ( )
getGlobalArgsFormat ( )
getNamedCommands ( )
hasCommand ( $name )
hasCommands ( )
hasDefaultCommands ( )
hasNamedCommands ( )
resolveCommand ( Webmozart\Console\Api\Args\RawArgs $args )
run ( Webmozart\Console\Api\Args\RawArgs $args = null, Webmozart\Console\Api\IO\InputStream $inputStream = null, Webmozart\Console\Api\IO\OutputStream $outputStream = null, Webmozart\Console\Api\IO\OutputStream $errorStream = null )

Private Methods

Method Description
addCommand ( CommandConfig $config )
exceptionToExitCode ( integer $code ) : integer Converts an exception code to an exit code.
validateCommandName ( CommandConfig $config )

Method Details

__construct() public method

Creates a new console application.
public __construct ( ApplicationConfig | callable $config )
$config Webmozart\Console\Api\Config\ApplicationConfig | callable The application configuration or a callable that creates the configuration.

getCommand() public method

public getCommand ( $name )

getCommands() public method

public getCommands ( )

getConfig() public method

public getConfig ( )

getDefaultCommands() public method

public getDefaultCommands ( )

getGlobalArgsFormat() public method

public getGlobalArgsFormat ( )

getNamedCommands() public method

public getNamedCommands ( )

hasCommand() public method

public hasCommand ( $name )

hasCommands() public method

public hasCommands ( )

hasDefaultCommands() public method

public hasDefaultCommands ( )

hasNamedCommands() public method

public hasNamedCommands ( )

resolveCommand() public method

public resolveCommand ( Webmozart\Console\Api\Args\RawArgs $args )
$args Webmozart\Console\Api\Args\RawArgs

run() public method

public run ( Webmozart\Console\Api\Args\RawArgs $args = null, Webmozart\Console\Api\IO\InputStream $inputStream = null, Webmozart\Console\Api\IO\OutputStream $outputStream = null, Webmozart\Console\Api\IO\OutputStream $errorStream = null )
$args Webmozart\Console\Api\Args\RawArgs
$inputStream Webmozart\Console\Api\IO\InputStream
$outputStream Webmozart\Console\Api\IO\OutputStream
$errorStream Webmozart\Console\Api\IO\OutputStream