Process

A process managed by the shell.

package

Default

Methods

__construct

__construct() 

exitCode

exitCode() : integer

Response

integer

the process exit code when the status is {@link ExecStatus#TERMINATED} otherwise {@code null}

getSession

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

Response

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

the process session

getTty

getTty() : \io\vertx\jphp\ext\shell\term\Tty

Response

\io\vertx\jphp\ext\shell\term\Tty

the process tty

Attempt to interrupt the process.

interrupt( $arg0 = null) : boolean

interrupt()

Attempt to interrupt the process.

param $completionHandler [callable] handler called after interrupt callback interrupt($completionHandler)

Arguments

$arg0

callable

Response

boolean

true if the process caught the signal

Suspend the process.

resume( $arg0 = null,  $arg1 = null) : void

resume()

Suspend the process.

param $foreground [boolean] resume($foreground)

Suspend the process.

param $completionHandler [callable] handler called after resume callback resume($completionHandler)

Suspend the process.

param $foreground [boolean] param $completionHandler [callable] handler called after resume callback resume($foreground, $completionHandler)

Arguments

$arg0

boolean | callable

$arg1

callable

Run the process.

run( $arg0 = null) : void

run()

Run the process.

param $foregraound [boolean] run($foregraound)

Arguments

$arg0

boolean

Set the process session

setSession( $arg0) : $this

Arguments

$arg0

Session

Response

$this

this object

Set the process tty.

setTty( $arg0) : $this

Arguments

$arg0

Tty

Response

$this

this object

status

status() : string

Response

string

the current process status

Resume the process.

suspend( $arg0 = null) : void

suspend()

Resume the process.

param $completionHandler [callable] handler called after suspend callback suspend($completionHandler)

Arguments

$arg0

callable

Terminate the process.

terminate( $arg0 = null) : void

terminate()

Terminate the process.

param $completionHandler [callable] handler called after end callback terminate($completionHandler)

Arguments

$arg0

callable

Set an handler for being notified when the process terminates.

terminatedHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

this object

Set the process in background.

toBackground( $arg0 = null) : void

toBackground()

Set the process in background.

param $completionHandler [callable] handler called after background callback toBackground($completionHandler)

Arguments

$arg0

callable

Set the process in foreground.

toForeground( $arg0 = null) : void

toForeground()

Set the process in foreground.

param $completionHandler [callable] handler called after foreground callback toForeground($completionHandler)

Arguments

$arg0

callable