Documentation

TplVars
in package
Uses Vars

Table of Contents

$globalVars  : array<string|int, mixed>
$vars  : array<string|int, mixed>
append()  : mixed
Append a string to existing variable.
appendGlobalVar()  : mixed
Append a string to existing global variable.
get()  : string
Get specific template variable and return an optional string if it's missing.
getVars()  : array<string|int, mixed>
Get an array of all available variables.
init()  : mixed
Init template variable with empty value.
set()  : mixed
Set template variable.
setGlobalVar()  : mixed
Set global template variable.
unsetLocalVariables()  : mixed
Reset local variables.

Properties

$globalVars

private static array<string|int, mixed> $globalVars = array()

$vars

private static array<string|int, mixed> $vars = array()

Methods

append()

Append a string to existing variable.

public static append(string $key, string|int|float|null $val) : mixed
Parameters
$key : string
$val : string|int|float|null
Return values
mixed

appendGlobalVar()

Append a string to existing global variable.

public static appendGlobalVar(string $key, string|int|float|null $val) : mixed
Parameters
$key : string
$val : string|int|float|null
Return values
mixed

get()

Get specific template variable and return an optional string if it's missing.

public static get(string $key[, string|null $returnInvalid = null ]) : string
Parameters
$key : string
$returnInvalid : string|null = null
Return values
string

getVars()

Get an array of all available variables.

public static getVars() : array<string|int, mixed>
Return values
array<string|int, mixed>

init()

Init template variable with empty value.

public static init(string $key) : mixed
Parameters
$key : string
Return values
mixed

set()

Set template variable.

public static set(string $key, string|int|float|null $val) : mixed
Parameters
$key : string
$val : string|int|float|null
Return values
mixed

setGlobalVar()

Set global template variable.

public static setGlobalVar(string $key, string|int|float|null $val) : mixed
Parameters
$key : string
$val : string|int|float|null
Return values
mixed

unsetLocalVariables()

Reset local variables.

public static unsetLocalVariables() : mixed
Return values
mixed

Search results