public function Init() { /** * show all errors */ show_errors(); /** * check if page is secured */ if (protocol() == 'https') { forceHTTPS(); } /** * initializing session */ sessions::init(); /** * getting requested url */ $this->Get_Url(); /** * replace - to _ */ array_walk($this->_Url, array($this, 'Url_replace')); /** * check if controller name not exists */ if (empty($this->_Url[0])) { $this->_Url[0] = default_controller(); } $this->Set_Controller(); $this->Set_Method(); }