/** * This method will be called after we route to the destinated method * * @access public * @return void */ public function before() { $this->language = Factory::get_language(); $this->user = Auth::make('user')->get(); Event::trigger('controller_before'); if (Request::is_hmvc()) { $this->set_content_type = false; } Restserver::auth(); return parent::before(); }
/** * Prepare Rest request * * @access protected */ protected function prepare_rest() { if (Request::main() !== Request::active()) { $this->set_content_type = false; } $this->template = null; Restserver::auth(); }