31 $error = sprintf(
'The command "%s" failed.'.
"\n\nExit Code: %s(%s)\n\nWorking directory: %s",
39 $error .= sprintf(
"\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s",
45 parent::__construct(
$error);
getOutput()
Returns the current output of the process (STDOUT).
getErrorOutput()
Returns the current error output of the process (STDERR).
getWorkingDirectory()
Gets the working directory.
isOutputDisabled()
Returns true in case the output is disabled, false otherwise.
isSuccessful()
Checks if the process ended successfully.
Exception for failed processes.
getExitCode()
Returns the exit code returned by the process.
getCommandLine()
Gets the command line to be executed.
Process is a thin wrapper around proc_* functions to easily start independent PHP processes...
getExitCodeText()
Returns a string representation for the exit code returned by the process.
__construct(Process $process)