Ejemplo n.º 1
0
Archivo: city.php Proyecto: anqh/core
 /**
  * Override __get() to handle JSON in i18n, returned as array.
  *
  * @param   string  $key
  * @return  mixed
  */
 public function __get($key)
 {
     if ($key == 'i18n' && $this->_data['i18n']) {
         return json_decode($this->_data['i18n'], true);
     }
     return parent::__get($key);
 }
Ejemplo n.º 2
0
 /**
  * Override __get() to handle JSON in data, returned as array.
  *
  * @param   string  $key
  * @return  mixed
  */
 public function __get($key)
 {
     if ($key == 'data' && $this->_data['data'] && !$this->is_aggregate()) {
         return json_decode($this->_data['data'], true);
     }
     return parent::__get($key);
 }