DATA Methods

store()

This function stores data bewteen templates and functions and basically acts like a global variable. Use this method if you whish to store a value in one template or function and then want to re-use this value in another.

mixed store( string ident [, mixed value = null ])

Return

Stored value.

Parameter
Description
identIdentifier under which the value will be stored.
valueValue to be stored.

Store value

$DATA->store("testvalue", 5)
RETURN: 5

Store another value

$DATA->store("anothervalue", "test")
RETURN: 'test'

Get stored value

$DATA->store("testvalue")
RETURN: 5