class ProcessBuilder
Process builder.
__construct(array $arguments = array()) Constructor | ||
static ProcessBuilder | create(array $arguments = array()) Creates a process builder instance. | |
ProcessBuilder | add(string $argument) Adds an unescaped argument to the command string. | |
ProcessBuilder | setPrefix(string|array $prefix) Adds an unescaped prefix to the command string. | |
ProcessBuilder | setArguments(array $arguments) Sets the arguments of the process. | |
ProcessBuilder | setWorkingDirectory(null|string $cwd) Sets the working directory. | |
ProcessBuilder | inheritEnvironmentVariables(bool $inheritEnv = true) Sets whether environment variables will be inherited or not. | |
ProcessBuilder | setEnv(string $name, null|string $value) Sets an environment variable | |
ProcessBuilder | addEnvironmentVariables(array $variables) Adds a set of environment variables. | |
ProcessBuilder | setInput(string|null $input) Sets the input of the process. | |
ProcessBuilder | setTimeout(float|null $timeout) Sets the process timeout. | |
ProcessBuilder | setOption(string $name, string $value) Adds a proc_open option. | |
ProcessBuilder | disableOutput() Disables fetching output and error output from the underlying process. | |
ProcessBuilder | enableOutput() Enables fetching output and error output from the underlying process. | |
Process | getProcess() Creates a Process instance and returns it. |
Constructor
Creates a process builder instance.
Adds an unescaped argument to the command string.
Adds an unescaped prefix to the command string.
The prefix is preserved when resetting arguments.
Sets the arguments of the process.
Arguments must not be escaped. Previous arguments are removed.
Sets the working directory.
Sets whether environment variables will be inherited or not.
Sets an environment variable
Setting a variable overrides its previous value. Use null
to unset a defined environment variable.
Adds a set of environment variables.
Already existing environment variables with the same name will be overridden by the new values passed to this method. Pass null
to unset a variable.
Sets the input of the process.
Deprecation: As of Symfony 2.5, this method only accepts string values.
Sets the process timeout.
To disable the timeout, set this value to null.
Adds a proc_open option.
Disables fetching output and error output from the underlying process.
Enables fetching output and error output from the underlying process.
Creates a Process instance and returns it.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Component/Process/ProcessBuilder.html