public function __construct() { $this->config = autoload_config(); $this->model = new Model(); if ($_GET['lang']) { $languages = scandir(DOC_ROOT . 'app/Language'); if (in_array($_GET['lang'], $languages)) { Session::set('s_locale', $_GET['lang']); } else { \Service\Debug\Debug::message('não foi possível localizar o idioma ' . $_GET['lang'] . '. Seu idioma não foi alterado.'); } } }