class Illuminate / Process / PendingProcess
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

PendingProcess

Uses

Properties

protected

$factory Factory

The process factory instance.

Default: null
public

$command array|string|null

The command to invoke the process.

Default: null
public

$path string|null

The working directory of the process.

Default: null
public

$timeout int|null

The maximum number of seconds the process may run.

Default: 60
public

$idleTimeout int

The maximum number of seconds the process may go without returning output.

Default: null
public

$environment array

The additional environment variables for the process.

Default: []
public

$input string|int|float|bool|resource|Traversable |null

The standard input data that should be piped into the command.

Default: null
public

$quietly bool

Indicates whether output should be disabled for the process.

Default: false
public

$tty bool

Indicates if TTY mode should be enabled.

Default: false
public

$options array

The options that will be passed to "proc_open".

Default: []
protected

$fakeHandlers array

The registered fake handler callbacks.

Default: []

Methods

public

__construct ( Factory $factory ) : void

Create a new pending process instance.

Parameters

public

command ( $command ) : $this

Specify the command that will invoke the process.

Parameters

  • $command array|string
public

path ( string $path ) : $this

Specify the working directory of the process.

Parameters

  • $path string
public

timeout ( int $timeout ) : $this

Specify the maximum number of seconds the process may run.

Parameters

  • $timeout int
public

idleTimeout ( int $timeout ) : $this

Specify the maximum number of seconds a process may go without returning output.

Parameters

  • $timeout int
public

forever ( ) : $this

Indicate that the process may run forever without timing out.

public

env ( array $environment ) : $this

Set the additional environent variables for the process.

Parameters

  • $environment array
public

input ( $input ) : $this

Set the standard input that should be provided when invoking the process.

Parameters

public

quietly ( ) : $this

Disable output for the process.

public

tty ( bool $tty ) : $this

Enable TTY mode for the process.

Parameters

  • $tty bool
public

options ( array $options ) : $this

Set the "proc_open" options that should be used when invoking the process.

Parameters

  • $options array
public

run ( $command , callable $output ) : ProcessResult

Run the process.

Parameters

  • $command array|string|null
  • $output callable|null
public

start ( $command , callable $output ) : InvokedProcess

Start the process in the background.

Parameters

  • $command array|string|null
  • $output callable
protected

toSymfonyProcess ( $command ) : Symfony\...\Process

Get a Symfony Process instance from the current pending command.

Parameters

  • $command array|string|null
public

withFakeHandlers ( array $fakeHandlers ) : $this

Specify the fake process result handlers for the pending process.

Parameters

  • $fakeHandlers array
protected

fakeFor ( string $command ) : Closure |null

Get the fake handler for the given command, if applicable.

Parameters

  • $command string
protected

resolveSynchronousFake ( string $command , Closure $fake ) : mixed

Resolve the given fake handler for a synchronous process.

Parameters

protected

resolveAsynchronousFake ( string $command , callable $output , Closure $fake ) : FakeInvokedProcess

Resolve the given fake handler for an asynchronous process.

Parameters

  • $command string
  • $output callable|null
  • $fake Closure