Documentation

Process
in package

Process utility functions

Tags
author

John Stevenson john-stevenson@blueyonder.co.uk

Table of Contents

Methods

escape()  : string
Escapes a string to be used as a shell argument.
escapeShellCommand()  : string
Escapes an array of arguments that make up a shell command
setEnv()  : bool
Makes putenv environment changes available in $_SERVER and $_ENV

Methods

escape()

Escapes a string to be used as a shell argument.

public static escape(string $arg[, bool $meta = true ][, bool $module = false ]) : string

From https://github.com/johnstevenson/winbox-args MIT Licensed (c) John Stevenson john-stevenson@blueyonder.co.uk

Parameters
$arg : string

The argument to be escaped

$meta : bool = true

Additionally escape cmd.exe meta characters

$module : bool = false

The argument is the module to invoke

Return values
string

escapeShellCommand()

Escapes an array of arguments that make up a shell command

public static escapeShellCommand(array<string|int, string> $args) : string
Parameters
$args : array<string|int, string>

Argument list, with the module name first

Return values
string

setEnv()

Makes putenv environment changes available in $_SERVER and $_ENV

public static setEnv(string $name[, string|null $value = null ]) : bool
Parameters
$name : string
$value : string|null = null

A null value unsets the variable

Return values
bool

        
On this page

Search results