October\Rain\Process\ProcessBase

ProcessBase is a base class for all other process classes

Protected properties

protected string $output

output stores the resulting output as a string

protected int $exitCode

exitCode stores the previous error code

protected string $basePath

basePath stores the directory where the process is called

protected Closure|null $useCallback

useCallback

Public methods

public void __construct($basePath=NULL)

__construct

Parameters
  • $basePath

public void lastExitCode()

lastExitCode returns the last known exit code

public void run($command)

run executes the process with the current configuration

Parameters
  • $command

public void runCallback($command, $callback)

runCallback executes the process with streamed output

Parameters
  • $command
  • $callback

public void runNow($command)

runNow executes the process and captures completed output

Parameters
  • $command

public void setCallback($callback)

setCallback instructs commands to execute output as a callback

Parameters
  • $callback