library/smarty/libs/sysplugins/smarty_undefined_variable.php
changeset 46 f11c31f7fa3e
parent 45 a56e7f9a0463
child 47 03388ec805b4
equal deleted inserted replaced
45:a56e7f9a0463 46:f11c31f7fa3e
     1 <?php
       
     2 
       
     3 /**
       
     4  * class for undefined variable object
       
     5  * This class defines an object for undefined variable handling
       
     6  *
       
     7  * @package    Smarty
       
     8  * @subpackage Template
       
     9  */
       
    10 class Smarty_Undefined_Variable {
       
    11     /**
       
    12      * Returns FALSE for 'nocache' and NULL otherwise.
       
    13      *
       
    14      * @param  string $name
       
    15      *
       
    16      * @return bool
       
    17      */
       
    18     public function __get($name) {
       
    19         if ($name == 'nocache') {
       
    20             return false;
       
    21         } else {
       
    22             return null;
       
    23         }
       
    24     }
       
    25 
       
    26     /**
       
    27      * Always returns an empty string.
       
    28      *
       
    29      * @return string
       
    30      */
       
    31     public function __toString() {
       
    32         return "";
       
    33     }
       
    34 }