Methods summary
public
|
|
public
Webmozart\Console\Api\Config\ApplicationConfig
|
#
getConfig( )
Returns the application configuration.
Returns the application configuration.
Returns
Implementation of
|
public
Webmozart\Console\Api\Args\Format\ArgsFormat
|
#
getGlobalArgsFormat( )
Returns the global arguments format of the application.
Returns the global arguments format of the application.
Returns
Implementation of
|
public
Webmozart\Console\Api\Command\Command
|
#
getCommand( string $name )
Returns the command for a given name.
Returns the command for a given name.
Parameters
- $name
- The name of the command.
Returns
Throws
NoSuchCommandException If the command is not found.
Implementation of
|
public
Webmozart\Console\Api\Command\CommandCollection
|
#
getCommands( )
Returns all registered commands.
Returns all registered commands.
Returns
Implementation of
|
public
boolean
|
#
hasCommand( string $name )
Returns whether the application has a command with a given name.
Returns whether the application has a command with a given name.
Parameters
- $name
- The name of the command.
Returns
boolean Returns true if the command with the given name exists and
false otherwise.
Implementation of
|
public
boolean
|
#
hasCommands( )
Returns whether the application has any registered commands.
Returns whether the application has any registered commands.
Returns
boolean Returns true if the application has any commands and
false otherwise.
Implementation of
|
public
Webmozart\Console\Api\Command\CommandCollection
|
#
getNamedCommands( )
Returns the commands that are not anonymous.
Returns the commands that are not anonymous.
Returns
Implementation of
|
public
boolean
|
#
hasNamedCommands( )
Returns whether the application has any commands that are not anonymous.
Returns whether the application has any commands that are not anonymous.
Returns
boolean Returns true if the application has named commands and
false otherwise.
Implementation of
|
public
Webmozart\Console\Api\Command\CommandCollection
|
#
getDefaultCommands( )
Returns the commands that should be executed if no explicit command is
passed.
Returns the commands that should be executed if no explicit command is
passed.
Returns
Implementation of
|
public
boolean
|
#
hasDefaultCommands( )
Returns whether the application has any default commands.
Returns whether the application has any default commands.
Returns
boolean Returns true if the application has default commands and
false otherwise.
Implementation of
|
public
ResolvedCommand
|
#
resolveCommand( Webmozart\Console\Api\Args\RawArgs $args )
Returns the command to execute for the given console arguments.
Returns the command to execute for the given console arguments.
Parameters
- $args
- The console arguments.
Returns
ResolvedCommand The command to execute.
Throws
CannotResolveCommandException If the command cannot be resolved.
Implementation of
|
public
integer
|
#
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 )
Executes the command.
Parameters
- $args
The console arguments. If not given,
the arguments passed to the PHP process
are used.
- $inputStream
The standard input. If not given, the
application reads from the standard
input of the PHP process.
- $outputStream
The standard output. If not given, the
application prints to the standard
output of the PHP process.
- $errorStream
The error output. If not given, the
application prints to the error output
of the PHP process.
Returns
integer The exit status.
Implementation of
|