Help And Documentation

2: Object Reference

2.11: The Data Object

A Data Variable object can be used to get, set or unset data variables of various different types. It can also be used to display a list of variables or the contents of arrays for debugging purposes and log errors.


Get Data

This method can only be used once.

Use this method to get the value of a data variable.

Parameters

Name Text Variable Object Array
Data Yes No No No
Name Yes Yes No No

Get Array Data

This method can only be used once.

Use this method to get the value of a data variable which is an array by also specifying an index.

Parameters

Name Text Variable Object Array
Data Yes No No No
Name Yes Yes No No
Array Index Yes Yes No No

Add Another Array Index

This method can be used multiple times.

Use this method to get the value of a data variable inside of nested arrays by specifying additional indexes.

Parameters

Name Text Variable Object Array
Index Yes Yes No No

Apply Function

This method can be used multiple times.

Use this method to apply a function to the value being returned by this object in order to escape the data for another purpose.

Parameters

Name Text Variable Object Array
Function Yes No No No

Get URL Value

This method can only be used once.

Use this method to get the value of a URL segment by specifying its index. The first index of the URL segments is zero.

Parameters

Name Text Variable Object Array
Segment Number Yes No No No

Set Data

This method can be used multiple times.

This method can be used to set a data variable.

Use this method to set the value of a data variable.

Parameters

Name Text Variable Object Array
Data Yes No No No
Name Yes Yes No No
Data Yes Yes Yes No

Set Array Data

This method can only be used once.

This method can be used to set a data variable.

Use this method to set the value of a data variable which is an array by also specifying an index.

Parameters

Name Text Variable Object Array
Data Yes No No No
Name Yes Yes No No
Index Yes Yes No No
Data Yes Yes Yes No

Add Another Array Index

This method can be used multiple times.

Use this method to get the value of a data variable inside of nested arrays by specifying additional indexes.

Parameters

Name Text Variable Object Array
Index Yes Yes No No

Unset Data

This method can be used multiple times.

This method can be used to set a data variable.

Use this method to unset a data variable.

Parameters

Name Text Variable Object Array
Type Yes No No No
Name Yes Yes No No
Index Yes Yes No No

Log Error

This method can only be used once.

Use this method to log a custom error message which you can access in the view log where other errors such as database errors can also be found. If the Debug Data method is used then its output will also be included in the error log.

Parameters

Name Text Variable Object Array
Error Yes No No No

Debug Data

This method can only be used once.

Use this method to display the values of any data variables which have been set during the execution of the site before the execution of this method. The entire nested contents of any arrays that are found will be displayed.

Parameters

Name Text Variable Object Array
Type Yes No No No

Next Page » « Previous Page