PHP Class Webmozart\Console\Handler\CallbackHandler

Since: 1.0
Author: Bernhard Schussek ([email protected])
ファイルを表示 Open project: webmozart/console Class Usage Examples

Public Methods

Method Description
__construct ( callable $callback ) Creates the command handler.
handle ( Args $args, IO $io, Command $command )

Method Details

__construct() public method

The passed callback receives three arguments: * {@link Args} $args: The console arguments. * {@link IO} $io: The I/O. * {@link Command} $command: The executed command. The callable should return 0 on success and a positive integer on error.
public __construct ( callable $callback )
$callback callable The callback to execute when handling a command.

handle() public method

public handle ( Args $args, IO $io, Command $command )
$args Webmozart\Console\Api\Args\Args
$io Webmozart\Console\Api\IO\IO
$command Webmozart\Console\Api\Command\Command