Esempio n. 1
0
 public function __get($key)
 {
     try {
         $result = parent::__get($key);
         if (!is_null($result)) {
             $this->{$key} = $result;
             return $result;
         } else {
             if (property_exists(__CLASS__, $key)) {
                 if (is_null($this->{$key})) {
                     $this->{$key} = get_bloginfo(WpLatteFunctions::camel2underscore($key));
                     return $this->{$key};
                 } else {
                     return $this->{$key};
                 }
             } else {
                 return '';
             }
         }
     } catch (WpLatteEntityException $e) {
         if (property_exists(__CLASS__, $key)) {
             if (is_null($this->{$key})) {
                 $this->{$key} = get_bloginfo(WpLatteFunctions::camel2underscore($key));
                 return $this->{$key};
             } else {
                 return $this->{$key};
             }
         } else {
             throw $e;
         }
     }
 }