TYPO3
7.6
|
Public Member Functions | |
__construct (array $variableArray=array()) | |
add ($identifier, $value) | |
get ($identifier) | |
remove ($identifier) | |
getAllIdentifiers () | |
getAll () | |
exists ($identifier) | |
__sleep () | |
offsetSet ($identifier, $value) | |
offsetUnset ($identifier) | |
offsetExists ($identifier) | |
offsetGet ($identifier) | |
getOrNull ($variableName) | |
Protected Attributes | |
$variables = array() | |
Static Protected Attributes | |
static | $reservedVariableNames = array('true', 'false', 'on', 'off', 'yes', 'no', '_all') |
VariableContainer which stores template variables. Is used in two contexts:
1) Holds the current variables in the template 2) Holds variables being set during Parsing (set in view helpers implementing the PostParse facet)
Definition at line 23 of file TemplateVariableContainer.php.
__construct | ( | array | $variableArray = array() | ) |
Constructor. Can take an array, and initializes the variables with it.
array | $variableArray |
Definition at line 45 of file TemplateVariableContainer.php.
__sleep | ( | ) |
Clean up for serializing.
Definition at line 148 of file TemplateVariableContainer.php.
add | ( | $identifier, | |
$value | |||
) |
Add a variable to the context
string | $identifier | Identifier of the variable to add |
mixed | $value | The variable's value |
Exception\InvalidVariableException |
Definition at line 59 of file TemplateVariableContainer.php.
Referenced by TemplateVariableContainer\offsetSet().
exists | ( | $identifier | ) |
Checks if this property exists in the VariableContainer.
string | $identifier |
Definition at line 134 of file TemplateVariableContainer.php.
Referenced by TemplateVariableContainer\offsetExists().
get | ( | $identifier | ) |
Get a variable from the context. Throws exception if variable is not found in context.
If "_all" is given as identifier, all variables are returned in an array.
string | $identifier |
Exception\InvalidVariableException |
Definition at line 80 of file TemplateVariableContainer.php.
References TemplateVariableContainer\$variables.
getAll | ( | ) |
Returns the variables array.
Definition at line 122 of file TemplateVariableContainer.php.
References TemplateVariableContainer\$variables.
getAllIdentifiers | ( | ) |
Returns an array of all identifiers available in the context.
Definition at line 112 of file TemplateVariableContainer.php.
getOrNull | ( | $variableName | ) |
Gets a variable or NULL if it does not exist
string | $variableName | name of the variable |
Definition at line 205 of file TemplateVariableContainer.php.
References TemplateVariableContainer\$variables.
offsetExists | ( | $identifier | ) |
Checks if this property exists in the VariableContainer.
string | $identifier |
Definition at line 182 of file TemplateVariableContainer.php.
References TemplateVariableContainer\exists().
offsetGet | ( | $identifier | ) |
Get a variable from the context. Throws exception if variable is not found in context.
string | $identifier |
Definition at line 193 of file TemplateVariableContainer.php.
offsetSet | ( | $identifier, | |
$value | |||
) |
Adds a variable to the context.
string | $identifier | Identifier of the variable to add |
mixed | $value | The variable's value |
Definition at line 160 of file TemplateVariableContainer.php.
References TemplateVariableContainer\add().
offsetUnset | ( | $identifier | ) |
Remove a variable from context. Throws exception if variable is not found in context.
string | $identifier | The identifier to remove |
Definition at line 171 of file TemplateVariableContainer.php.
remove | ( | $identifier | ) |
Remove a variable from context. Throws exception if variable is not found in context.
string | $identifier | The identifier to remove |
Exception\InvalidVariableException |
Definition at line 99 of file TemplateVariableContainer.php.
|
staticprotected |
Definition at line 30 of file TemplateVariableContainer.php.
|
protected |
Definition at line 37 of file TemplateVariableContainer.php.
Referenced by TemplateVariableContainer\get(), TemplateVariableContainer\getAll(), and TemplateVariableContainer\getOrNull().