\rex_var

Abstract baseclass for REX_VARS.

Summary

Methods
Properties
Constants
parse()
toArray()
nothing()
No public properties found
ENV_FRONTEND
ENV_BACKEND
ENV_INPUT
ENV_OUTPUT
hasArg()
getArg()
getParsedArg()
environmentIs()
getContext()
getContextData()
getOutput()
quote()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

ENV_FRONTEND

ENV_FRONTEND = 1

ENV_BACKEND

ENV_BACKEND = 2

ENV_INPUT

ENV_INPUT = 4

ENV_OUTPUT

ENV_OUTPUT = 8

Methods

parse()

parse(string  $content, int  $env = null, string  $context = null, mixed  $contextData = null) : string

Parses all REX_VARs in the given content.

Parameters

string $content

Content

int $env

Environment

string $context

Context

mixed $contextData

Context data

Returns

string —

toArray()

toArray(string  $value) : array|null

Converts a REX_VAR content to a PHP array.

Parameters

string $value

Returns

array|null —

nothing()

nothing() : string

Returns empty string.

Returns

string —

hasArg()

hasArg(string  $key, bool  $defaultArg = false) : bool

Checks whether the given arguments exists.

Parameters

string $key
bool $defaultArg

Returns

bool —

getArg()

getArg(string  $key, null|string|int  $default = null, bool  $defaultArg = false) : null|string|int

Returns the argument.

Parameters

string $key
null|string|int $default
bool $defaultArg

Returns

null|string|int —

getParsedArg()

getParsedArg(string  $key, null|string|int  $default = null, bool  $defaultArg = false) : int|null|string

Returns the (recursive) parsed argument.

Parameters

string $key
null|string|int $default
bool $defaultArg

Returns

int|null|string —

environmentIs()

environmentIs(int  $env) : bool

Checks whether the given envirenment is active.

Parameters

int $env

Environment

Returns

bool —

getContext()

getContext() : string

Returns the context.

Returns

string —

getContextData()

getContextData() : mixed

Returns the context data.

Returns

mixed —

getOutput()

getOutput() : false|string

Returns the output.

Returns

false|string —

quote()

quote(string  $string) : string

Quotes the string for php context.

Parameters

string $string

Returns

string —