CommandProcess

The command process provides interaction with the process of the command provided by Vert.x Shell.

package

Default

Methods

__construct

__construct() 

args

args() : array

Response

array

the actual string arguments of the command

argsTokens

argsTokens() : array

Response

array

the unparsed arguments tokens

Set a background handler, this handler is called when the command is running and put to background.

backgroundHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

this command

commandLine

commandLine() : \io\vertx\jphp\core\cli\CommandLine

Response

\io\vertx\jphp\core\cli\CommandLine

the command line object or null

End the process with the exit status

end( $arg0 = null) : void

end()

End the process.

param $status [integer] the exit status. end($status)

Arguments

$arg0

integer

Set an end handler, this handler is called when the command is ended, for instance the command is running and the shell closes.

endHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

a reference to this, so the API can be used fluently

Set a foreground handler, this handler is called when the command is running and put to foreground.

foregroundHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

this command

height

height() : integer

Response

integer

the current height, i.e the number of columns or {@literal -1} if unknown

Set an interrupt handler, this handler is called when the command is interrupted, for instance user press <code>Ctrl-C</code>.

interruptHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

this command

isForeground

isForeground() : boolean

Response

boolean

true if the command is running in foreground

resizehandler

resizehandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

Set a resume handler, this handler is called when the command is resumed, for instance user types <code>bg</code> or <code>fg</code> to resume the command.

resumeHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

this command

session

session() : \io\vertx\jphp\ext\shell\session\Session

Response

\io\vertx\jphp\ext\shell\session\Session

the shell session

stdinHandler

stdinHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

Set a suspend handler, this handler is called when the command is suspended, for instance user press <code>Ctrl-Z</code>.

suspendHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

this command

type

type() : string

Response

string

the declared tty type, for instance {@literal vt100}, {@literal xterm-256}, etc... it can be null when the tty does not have declared its type.

vertx

vertx() : \io\vertx\jphp\core\Vertx

Response

\io\vertx\jphp\core\Vertx

the current Vert.x instance

width

width() : integer

Response

integer

the current width, i.e the number of rows or {@literal -1} if unknown

Write some text to the standard output.

write( $arg0) : $this

Arguments

$arg0

string

Response

$this

a reference to this, so the API can be used fluently