CommandBuilder

A build for Vert.x Shell command.

package

Default

Methods

__construct

__construct() 

Build the command

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

Arguments

$arg0

Vertx

Response

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

the built command

Create a new commmand builder, the command is responsible for managing the options and arguments via the

command( $arg0) : \io\vertx\jphp\ext\shell\command\CommandBuilder
static
see \io\vertx\jphp\ext\shell\command\CommandProcess

args() arguments.

param $name [string] the command name command($name)

Create a new commmand with its @see \io\vertx\jphp\core\cli\CLI descriptor. This command can then retrieve the parsed

\io\vertx\jphp\ext\shell\command\CommandProcess::commandLine

when it executes to know get the command arguments and options.

param $cli [CLI] the cli to use command($cli)

Arguments

$arg0

CLI | string

Response

\io\vertx\jphp\ext\shell\command\CommandBuilder

the command

Set the command completion handler, the completion handler when the user asks for contextual command line completion, usually hitting the <i>tab</i> key.

completionHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

this command object

Set the command process handler, the process handler is called when the command is executed.

processHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

this command object