CommandRegistry

A registry that contains the commands known by a shell.<p/>

It is a mutable command resolver.

package

Default

Methods

__construct

__construct() 

commands

commands() : array

Response

array

the current commands

Create a new registry.

create( $arg0) : \io\vertx\jphp\ext\shell\command\CommandRegistry
static

Arguments

$arg0

Vertx

Response

\io\vertx\jphp\ext\shell\command\CommandRegistry

the created registry

Returns a single command by its name.

getCommand( $arg0) : \io\vertx\jphp\ext\shell\command\Command

Arguments

$arg0

string

Response

\io\vertx\jphp\ext\shell\command\Command

the commad or null

Get the shared registry for the Vert.x instance.

getShared( $arg0) : \io\vertx\jphp\ext\shell\command\CommandRegistry
static

Arguments

$arg0

Vertx

Response

\io\vertx\jphp\ext\shell\command\CommandRegistry

the shared registry

Like @see \io\vertx\jphp\ext\shell\command\CommandRegistry::registerCommand, without a completion handler.

registerCommand( $arg0,  $arg1 = null) : $this

param $command [Command] registerCommand($command)

Register a command

param $command [Command] the command to register param $completionHandler [callable] notified when the command is registered registerCommand($command, $completionHandler)

Arguments

$arg0

Command

$arg1

callable

Response

$this

Like @see \io\vertx\jphp\ext\shell\command\CommandRegistry::registerCommands, without a completion handler.

registerCommands( $arg0,  $arg1 = null) : $this

param $commands [array] registerCommands($commands)

Register a list of commands.

param $commands [array] the commands to register param $completionHandler [callable] notified when the command is registered registerCommands($commands, $completionHandler)

Arguments

$arg0

array

$arg1

callable

Response

$this

Like @see \io\vertx\jphp\ext\shell\command\CommandRegistry::unregisterCommand, without a completion handler.

unregisterCommand( $arg0,  $arg1 = null) : $this

param $commandName [string] unregisterCommand($commandName)

Unregister a command.

param $commandName [string] the command name param $completionHandler [callable] notified when the command is unregistered unregisterCommand($commandName, $completionHandler)

Arguments

$arg0

string

$arg1

callable

Response

$this