/** * {@inheritdoc} */ public function json(array $data = array(), $result = true) { $this->_cms->trigger(AbstractEvents::EVENT_SHUTDOWN); $this->_cms->trigger(AbstractEvents::EVENT_SHUTDOWN . '.json', [&$data, &$result]); Ob::clean(); $this->noCache(); $this->setHeader('Content-Type', 'application/json; charset=utf-8'); $this->_app->sendHeaders(); echo json_encode((array) $data); jexit(); }