public function __construct(Router $_router, $_ = array()) { $this->lang = $_router->getLang(); if (!in_array($this->lang, \Ker\Config::getOne("allowedLanguages"))) { $this->lang = \Ker\Config::getOne("defaultLanguage"); $this->setError(404); return; } $this->module = $_router->getModule(); $this->action = $_router->getAction(); $this->data = $_router->getData(); $this->extra = $_router->getExtra(); $view = $this->getView(); if (!$this->module) { $this->module = "Index"; $this->action = "index"; } elseif (isset($_["requireViewFile"]) and $_["requireViewFile"] and !file_exists($view::getViewFile($this->lang, $this->module, $this->action))) { $this->setError(404); } }