7.2. Opt_View class
7.2.3. __isset()
7.2.2. __get()
« Previous
7.2.4. __set()
Next »

7.2.3. __isset()

ConstructMagic method
Visibilitypublic
Referenceboolean __isset(string $name)
Versionssince 2.0-beta2

This magic method provides an alternative way to check if a template local variable $name exists:

if(isset($view->variable))
{
    // some code...
}

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

See also:

7.2.3. __isset()
7.2. Opt_View class
« Previous
7.2.2. __get()
Next »
7.2.4. __set()