ProcessHelper

class ProcessHelper extends Helper The ProcessHelper class provides helpers to run external processes. Methods setHelperSet(HelperSet $helperSet = null) Sets the helper set associated with this helper. from Helper HelperSet getHelperSet() Gets the helper set associated with this helper. from Helper static int strlen(string $string) Returns the length of a string, using mb_strwidth if it is available. from Helper static formatTime($secs) from Helper static formatMemory($m

ProcessBuilder::setWorkingDirectory()

ProcessBuilder setWorkingDirectory(null|string $cwd) Sets the working directory. Parameters null|string $cwd The working directory Return Value ProcessBuilder

ProcessFailedException

class ProcessFailedException extends RuntimeException Exception for failed processes. Methods __construct(Process $process) getProcess() Details __construct(Process $process) Parameters Process $process getProcess()

ProcessBuilder::setTimeout()

ProcessBuilder setTimeout(float|null $timeout) Sets the process timeout. To disable the timeout, set this value to null. Parameters float|null $timeout Return Value ProcessBuilder Exceptions InvalidArgumentException

ProcessBuilder::setPrefix()

ProcessBuilder setPrefix(string|array $prefix) Adds a prefix to the command string. The prefix is preserved when resetting arguments. Parameters string|array $prefix A command prefix or an array of command prefixes Return Value ProcessBuilder

ProcessBuilder::setOption()

ProcessBuilder setOption(string $name, string $value) Adds a proc_open option. Parameters string $name The option name string $value The option value Return Value ProcessBuilder

ProcessBuilder::inheritEnvironmentVariables()

ProcessBuilder inheritEnvironmentVariables(bool $inheritEnv = true) Sets whether environment variables will be inherited or not. Parameters bool $inheritEnv Return Value ProcessBuilder

ProcessBuilder::getProcess()

Process getProcess() Creates a Process instance and returns it. Return Value Process Exceptions LogicException In case no arguments have been provided

ProcessBuilder::setInput()

ProcessBuilder setInput(resource|scalar|Traversable|null $input) Sets the input of the process. Parameters resource|scalar|Traversable|null $input The input content Return Value ProcessBuilder Exceptions InvalidArgumentException In case the argument is invalid

ProcessBuilder::setArguments()

ProcessBuilder setArguments(array $arguments) Sets the arguments of the process. Arguments must not be escaped. Previous arguments are removed. Parameters array $arguments Return Value ProcessBuilder