Documentation

ProcessUtils
in package

ProcessUtils is a bunch of utility methods.

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

Tags
author

Martin Hasoň martin.hason@gmail.com

Table of Contents

Methods

escapeArgument()  : string
Escapes a string to be used as a shell argument.
validateInput()  : mixed
Validates and normalizes a Process input.
__construct()  : mixed
This class should not be instantiated.
isSurroundedBy()  : mixed

Methods

escapeArgument()

Escapes a string to be used as a shell argument.

public static escapeArgument(string $argument) : string

since version 3.3, to be removed in 4.0. Use a command line array or give env vars to the Process::start/run() method instead.

Parameters
$argument : string

The argument that will be escaped

Return values
string

The escaped argument

validateInput()

Validates and normalizes a Process input.

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

The name of method call that validates the input

$input : mixed

The input to validate

Tags
throws
InvalidArgumentException

In case the input is not valid

Return values
mixed

The validated input

__construct()

This class should not be instantiated.

private __construct() : mixed

isSurroundedBy()

private static isSurroundedBy(mixed $arg, mixed $char) : mixed
Parameters
$arg : mixed
$char : mixed

        
On this page

Search results