/** * 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); }
/** * 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); }