PHP Interface ZF\Console\DispatcherInterface

Mostra file Open project: zfcampus/zf-console Interface Usage Examples

Public Methods

Method Description
dispatch ( Route $route, Zend\Console\Adapter\AdapterInterface $console ) : integer Dispatch a routed command to its handler.
has ( string $command ) : boolean Does the dispatcher have a handler for the given command?
map ( string $command, $callable ) : self Map a command name to its handler.

Method Details

dispatch() public method

Dispatch a routed command to its handler.
public dispatch ( Route $route, Zend\Console\Adapter\AdapterInterface $console ) : integer
$route Route
$console Zend\Console\Adapter\AdapterInterface
return integer The exit status code from the command.

has() public method

Does the dispatcher have a handler for the given command?
public has ( string $command ) : boolean
$command string
return boolean

map() public method

Map a command name to its handler.
public map ( string $command, $callable ) : self
$command string
return self Should implement a fluent interface.