- 7.2. Opt_View class
7.2.13. defined() - 7.2.12. clear()
« Previous - 7.2.14. definedGlobal()
Next »
7.2.13. defined()
| Construct | Method |
|---|---|
| Visibility | public |
| Reference | boolean defined( string $name ) |
Returns true, if there already exists a local template variable $name assigned to the current view.
if(!$view->defined('foo')) { $view->foo = $someValue; }
Alternatively, you may use the following syntax:
if(!isset($view->foo)) { $view->foo = $someValue; }
See also:
- 7.2.13. defined()
7.2. Opt_View class - « Previous
7.2.12. clear() - Next »
7.2.14. definedGlobal()