Class rex_var

Abstract baseclass for REX_VARS.

Direct known subclasses

rex_var_article, rex_var_category, rex_var_value, rex_var_clang, rex_var_config, rex_var_link, rex_var_linklist, rex_var_media, rex_var_medialist, rex_var_property, rex_var_template

Abstract
Package: redaxo\core
Located at redaxo/src/core/lib/var/var.php

Methods summary

public static string
# parse( string $content, integer $env = null, string $context = null, mixed $contextData = null )

Parses all REX_VARs in the given content.

protected boolean
# hasArg( string $key, boolean $defaultArg = false )

Checks whether the given arguments exists.

protected null|string
# getArg( string $key, null|string $default = null, boolean $defaultArg = false )

Returns the argument.

protected integer|null|string
# getParsedArg( string $key, null|string $default = null, boolean $defaultArg = false )

Returns the (recursive) parsed argument.

protected boolean
# environmentIs( integer $env )

Checks whether the given envirenment is active.

protected string
# getContext( )

Returns the context.

protected mixed
# getContextData( )

Returns the context data.

abstract protected boolean|string
# getOutput( )

Returns the output.

protected static string
# quote( string $string )

Quotes the string for php context.

public static array|null
# toArray( string $value )

Converts a REX_VAR content to a PHP array.

public static string
# nothing( )

Returns empty string.

Constants summary

integer ENV_FRONTEND
#1
integer ENV_BACKEND
#2
integer ENV_INPUT
#4
integer ENV_OUTPUT
#8