PHP 인터페이스 Webmozart\Console\Api\Application\Application

부터: 1.0
저자: Bernhard Schussek ([email protected])
파일 보기 프로젝트 열기: webmozart/console 0 사용 예제들

공개 메소드들

메소드 설명
getCommand ( string $name ) : Command Returns the command for a given name.
getCommands ( ) : CommandCollection Returns all registered commands.
getConfig ( ) : ApplicationConfig Returns the application configuration.
getDefaultCommands ( ) : CommandCollection Returns the commands that should be executed if no explicit command is passed.
getGlobalArgsFormat ( ) : ArgsFormat Returns the global arguments format of the application.
getNamedCommands ( ) : CommandCollection Returns the commands that are not anonymous.
hasCommand ( string $name ) : boolean Returns whether the application has a command with a given name.
hasCommands ( ) : boolean Returns whether the application has any registered commands.
hasDefaultCommands ( ) : boolean Returns whether the application has any default commands.
hasNamedCommands ( ) : boolean Returns whether the application has any commands that are not anonymous.
resolveCommand ( Webmozart\Console\Api\Args\RawArgs $args ) : ResolvedCommand Returns the command to execute for the given console arguments.
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 ) : integer Executes the command.

메소드 상세

getCommand() 공개 메소드

Returns the command for a given name.
public getCommand ( string $name ) : Command
$name string The name of the command.
리턴 Webmozart\Console\Api\Command\Command The command.

getCommands() 공개 메소드

Returns all registered commands.
public getCommands ( ) : CommandCollection
리턴 Webmozart\Console\Api\Command\CommandCollection The commands.

getConfig() 공개 메소드

Returns the application configuration.
public getConfig ( ) : ApplicationConfig
리턴 Webmozart\Console\Api\Config\ApplicationConfig The application configuration.

getDefaultCommands() 공개 메소드

Returns the commands that should be executed if no explicit command is passed.
public getDefaultCommands ( ) : CommandCollection
리턴 Webmozart\Console\Api\Command\CommandCollection The default commands.

getGlobalArgsFormat() 공개 메소드

Returns the global arguments format of the application.
public getGlobalArgsFormat ( ) : ArgsFormat
리턴 Webmozart\Console\Api\Args\Format\ArgsFormat The global arguments format.

getNamedCommands() 공개 메소드

Returns the commands that are not anonymous.
public getNamedCommands ( ) : CommandCollection
리턴 Webmozart\Console\Api\Command\CommandCollection The named commands.

hasCommand() 공개 메소드

Returns whether the application has a command with a given name.
public hasCommand ( string $name ) : boolean
$name string The name of the command.
리턴 boolean Returns `true` if the command with the given name exists and `false` otherwise.

hasCommands() 공개 메소드

Returns whether the application has any registered commands.
public hasCommands ( ) : boolean
리턴 boolean Returns `true` if the application has any commands and `false` otherwise.

hasDefaultCommands() 공개 메소드

Returns whether the application has any default commands.
또한 보기: getDefaultCommands()
public hasDefaultCommands ( ) : boolean
리턴 boolean Returns `true` if the application has default commands and `false` otherwise.

hasNamedCommands() 공개 메소드

Returns whether the application has any commands that are not anonymous.
또한 보기: getNamedCommands()
public hasNamedCommands ( ) : boolean
리턴 boolean Returns `true` if the application has named commands and `false` otherwise.

resolveCommand() 공개 메소드

Returns the command to execute for the given console arguments.
public resolveCommand ( Webmozart\Console\Api\Args\RawArgs $args ) : ResolvedCommand
$args Webmozart\Console\Api\Args\RawArgs The console arguments.
리턴 Webmozart\Console\Api\Resolver\ResolvedCommand The command to execute.

run() 공개 메소드

Executes the command.
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 ) : integer
$args Webmozart\Console\Api\Args\RawArgs The console arguments. If not given, the arguments passed to the PHP process are used.
$inputStream Webmozart\Console\Api\IO\InputStream The standard input. If not given, the application reads from the standard input of the PHP process.
$outputStream Webmozart\Console\Api\IO\OutputStream The standard output. If not given, the application prints to the standard output of the PHP process.
$errorStream Webmozart\Console\Api\IO\OutputStream The error output. If not given, the application prints to the error output of the PHP process.
리턴 integer The exit status.