7.2. Opt_View class
7.2.15. get()
7.2.14. definedGlobal()
« Previous
7.2.16. getBranch()
Next »

7.2.15. get()

ConstructMethod
Visibilitypublic
Referenceboolean get( string $name )
Argument list
$name - string
The variable name
Returned valueThe template variable value
Versionssince 2.0-beta2

Returns the value of the $name template variable.

$view->variable = 'foo';
 
echo $view->get('variable'); // prints "foo"

You may also read the variable value using the magic method Opt_View::get(): $view->variable. It is the recommended solution.

See also:

7.2.15. get()
7.2. Opt_View class
« Previous
7.2.14. definedGlobal()
Next »
7.2.16. getBranch()