Exemple #1
0
 /** Initialize all scripts for this request and domain
  * @return void
  */
 public function init()
 {
     if ($this->get('lang')) {
         $this->lang = $this->get('lang');
     } else {
         if ($this->cookie('lang')) {
             $this->lang = $this->cookie('lang');
         }
     }
     try {
         $login = \System\Settings::get('policies', 'auto_login');
     } catch (\System\Error\Config $e) {
         $login = true;
     }
     if ($login) {
         $this->relogin();
     }
     \System\Init::run($this->init, array("request" => $this));
     return $this;
 }
Exemple #2
0
 public function init()
 {
     if (!$this->is_initialized()) {
         $this->cookie_store('lang', $this->locales->get_lang());
         if ($this->init) {
             \System\Init::run($this->init, array("request" => $this->request, "response" => $this));
         }
         $this->init_done = true;
     }
 }