ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Public Member Functions | |
__construct (array $arguments=array()) | |
Constructor. More... | |
add ($argument) | |
Adds an unescaped argument to the command string. More... | |
setPrefix ($prefix) | |
Adds a prefix to the command string. More... | |
setArguments (array $arguments) | |
Sets the arguments of the process. More... | |
setWorkingDirectory ($cwd) | |
Sets the working directory. More... | |
inheritEnvironmentVariables ($inheritEnv=true) | |
Sets whether environment variables will be inherited or not. More... | |
setEnv ($name, $value) | |
Sets an environment variable. More... | |
addEnvironmentVariables (array $variables) | |
Adds a set of environment variables. More... | |
setInput ($input) | |
Sets the input of the process. More... | |
setTimeout ($timeout) | |
Sets the process timeout. More... | |
setOption ($name, $value) | |
Adds a proc_open option. More... | |
disableOutput () | |
Disables fetching output and error output from the underlying process. More... | |
enableOutput () | |
Enables fetching output and error output from the underlying process. More... | |
getProcess () | |
Creates a Process instance and returns it. More... | |
Static Public Member Functions | |
static | create (array $arguments=array()) |
Creates a process builder instance. More... | |
Private Attributes | |
$arguments | |
$cwd | |
$env = array() | |
$input | |
$timeout = 60 | |
$options = array() | |
$inheritEnv = true | |
$prefix = array() | |
$outputDisabled = false | |
Process builder.
Definition at line 22 of file ProcessBuilder.php.
Constructor.
string[] | $arguments An array of arguments |
Definition at line 39 of file ProcessBuilder.php.
References Symfony\Component\Process\ProcessBuilder\$arguments.
Symfony\Component\Process\ProcessBuilder::add | ( | $argument | ) |
Adds an unescaped argument to the command string.
string | $argument | A command argument |
Definition at line 63 of file ProcessBuilder.php.
Symfony\Component\Process\ProcessBuilder::addEnvironmentVariables | ( | array | $variables | ) |
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.
array | $variables | The variables |
Definition at line 160 of file ProcessBuilder.php.
Creates a process builder instance.
string[] | $arguments An array of arguments |
Definition at line 51 of file ProcessBuilder.php.
References Symfony\Component\Process\ProcessBuilder\$arguments.
Referenced by Symfony\Component\Process\Tests\ProcessBuilderTest\testInheritEnvironmentVars(), Symfony\Component\Process\Tests\ProcessBuilderTest\testInvalidInput(), Symfony\Component\Process\Tests\ProcessBuilderTest\testProcessShouldInheritAndOverrideEnvironmentVars(), Symfony\Component\Process\Tests\ProcessBuilderTest\testShouldNotThrowALogicExceptionIfNoArgument(), Symfony\Component\Process\Tests\ProcessBuilderTest\testShouldNotThrowALogicExceptionIfNoPrefix(), Symfony\Component\Process\Tests\ProcessBuilderTest\testShouldReturnProcessWithDisabledOutput(), Symfony\Component\Process\Tests\ProcessBuilderTest\testShouldReturnProcessWithEnabledOutput(), and Symfony\Component\Process\Tests\ProcessBuilderTest\testShouldThrowALogicExceptionIfNoPrefixAndNoArgument().
Symfony\Component\Process\ProcessBuilder::disableOutput | ( | ) |
Disables fetching output and error output from the underlying process.
Definition at line 233 of file ProcessBuilder.php.
Symfony\Component\Process\ProcessBuilder::enableOutput | ( | ) |
Enables fetching output and error output from the underlying process.
Definition at line 245 of file ProcessBuilder.php.
Symfony\Component\Process\ProcessBuilder::getProcess | ( | ) |
Creates a Process instance and returns it.
LogicException | In case no arguments have been provided |
Definition at line 259 of file ProcessBuilder.php.
References $_SERVER, Symfony\Component\Process\ProcessBuilder\$arguments, Symfony\Component\Process\ProcessBuilder\$env, Symfony\Component\Process\ProcessBuilder\$options, array, and input.
Symfony\Component\Process\ProcessBuilder::inheritEnvironmentVariables | ( | $inheritEnv = true | ) |
Sets whether environment variables will be inherited or not.
bool | $inheritEnv |
Definition at line 124 of file ProcessBuilder.php.
References Symfony\Component\Process\ProcessBuilder\$inheritEnv.
Symfony\Component\Process\ProcessBuilder::setArguments | ( | array | $arguments | ) |
Sets the arguments of the process.
Arguments must not be escaped. Previous arguments are removed.
string[] | $arguments |
Definition at line 96 of file ProcessBuilder.php.
References Symfony\Component\Process\ProcessBuilder\$arguments.
Symfony\Component\Process\ProcessBuilder::setEnv | ( | $name, | |
$value | |||
) |
Sets an environment variable.
Setting a variable overrides its previous value. Use null
to unset a defined environment variable.
string | $name | The variable name |
null | string | $value | The variable value |
Definition at line 142 of file ProcessBuilder.php.
Referenced by Assetic\Filter\BaseProcessFilter\mergeEnv().
Symfony\Component\Process\ProcessBuilder::setInput | ( | $input | ) |
Sets the input of the process.
resource | scalar | \Traversable | null | $input | The input content |
InvalidArgumentException | In case the argument is invalid |
Definition at line 176 of file ProcessBuilder.php.
References Symfony\Component\Process\ProcessBuilder\$input, input, and Symfony\Component\Process\ProcessUtils\validateInput().
Symfony\Component\Process\ProcessBuilder::setOption | ( | $name, | |
$value | |||
) |
Adds a proc_open option.
string | $name | The option name |
string | $value | The option value |
Definition at line 221 of file ProcessBuilder.php.
Symfony\Component\Process\ProcessBuilder::setPrefix | ( | $prefix | ) |
Adds a prefix to the command string.
The prefix is preserved when resetting arguments.
string | array | $prefix | A command prefix or an array of command prefixes |
Definition at line 79 of file ProcessBuilder.php.
References Symfony\Component\Process\ProcessBuilder\$prefix, and array.
Symfony\Component\Process\ProcessBuilder::setTimeout | ( | $timeout | ) |
Sets the process timeout.
To disable the timeout, set this value to null.
float | null | $timeout |
InvalidArgumentException |
Definition at line 194 of file ProcessBuilder.php.
References Symfony\Component\Process\ProcessBuilder\$timeout.
Symfony\Component\Process\ProcessBuilder::setWorkingDirectory | ( | $cwd | ) |
Sets the working directory.
null | string | $cwd | The working directory |
Definition at line 110 of file ProcessBuilder.php.
References Symfony\Component\Process\ProcessBuilder\$cwd.
|
private |
|
private |
Definition at line 25 of file ProcessBuilder.php.
Referenced by Symfony\Component\Process\ProcessBuilder\setWorkingDirectory().
|
private |
Definition at line 26 of file ProcessBuilder.php.
Referenced by Symfony\Component\Process\ProcessBuilder\getProcess().
|
private |
Definition at line 30 of file ProcessBuilder.php.
Referenced by Symfony\Component\Process\ProcessBuilder\inheritEnvironmentVariables().
|
private |
Definition at line 27 of file ProcessBuilder.php.
Referenced by Symfony\Component\Process\ProcessBuilder\setInput().
|
private |
Definition at line 29 of file ProcessBuilder.php.
Referenced by Symfony\Component\Process\ProcessBuilder\getProcess().
|
private |
Definition at line 32 of file ProcessBuilder.php.
|
private |
Definition at line 31 of file ProcessBuilder.php.
Referenced by Symfony\Component\Process\ProcessBuilder\setPrefix().
|
private |
Definition at line 28 of file ProcessBuilder.php.
Referenced by Symfony\Component\Process\ProcessBuilder\setTimeout().