W3cubDocs

/Symfony 2.7

Symfony\Component\Process\ProcessUtils

class ProcessUtils

ProcessUtils is a bunch of utility methods.

This class contains static methods only and is not meant to be instantiated.

Methods

static string escapeArgument(string $argument)

Escapes a string to be used as a shell argument.

static string validateInput(string $caller, mixed $input)

Validates and normalizes a Process input

Details

static public string escapeArgument(string $argument)

Escapes a string to be used as a shell argument.

Parameters

string $argument The argument that will be escaped

Return Value

string The escaped argument

static public string validateInput(string $caller, mixed $input)

Validates and normalizes a Process input

Parameters

string $caller The name of method call that validates the input
mixed $input The input to validate

Return Value

string The validated input

Exceptions

InvalidArgumentException In case the input is not valid

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Component/Process/ProcessUtils.html