7.2. Opt_View class
7.2.2. __get()
7.2.1. __construct()
« Previous
7.2.3. __isset()
Next »

7.2.2. __get()

ConstructMagic method
Visibilitypublic
Referencemixed &__get(string $name)
Versionssince 2.0-beta2

This magic method provides an alternative way to read the local template variable value:

echo $view->variable;

The value is returned by reference.

It is recommended to use the magic method instead of Opt_View::get() unless we are not going to specify a dynamic variable name.

See also:

7.2.2. __get()
7.2. Opt_View class
« Previous
7.2.1. __construct()
Next »
7.2.3. __isset()