original_string: public function save_session(): self
    {
      $id_session = $this->get_id_session();
      //die(var_dump($id_session, $this->check()));
      if ( $id_session && $this->check() ){
        $p =& $this->class_cfg['arch']['sessions'];
        $this->db->update($this->class_cfg['tables']['sessions'], [
          $p['id_user'] => $this->id,
          $p['sess_id'] => $this->session->get_id(),
          $p['ip_address'] => $this->ip_address,
          $p['user_agent'] => $this->user_agent,
          $p['opened'] => 1,
          $p['last_activity'] => date('Y-m-d H:i:s'),
          $p['cfg'] => json_encode($this->sess_cfg)
        ], [
          $p['id'] => $id_session
        ]);
      }
      else{
        $this->set_error(13);
      }
      return $this;
    }
code: public function save_session(): self
    {
      $id_session = $this->get_id_session();
      //die(var_dump($id_session, $this->check()));
      if ( $id_session && $this->check() ){
        $p =& $this->class_cfg['arch']['sessions'];
        $this->db->update($this->class_cfg['tables']['sessions'], [
          $p['id_user'] => $this->id,
          $p['sess_id'] => $this->session->get_id(),
          $p['ip_address'] => $this->ip_address,
          $p['user_agent'] => $this->user_agent,
          $p['opened'] => 1,
          $p['last_activity'] => date('Y-m-d H:i:s'),
          $p['cfg'] => json_encode($this->sess_cfg)
        ], [
          $p['id'] => $id_session
        ]);
      }
      else{
        $this->set_error(13);
      }
      return $this;
    }
code_tokens: public function save_session ( ) : self { $ id_session = $ this -> get_id_session ( ) ; //die(var_dump($id_session, $this->check())); if ( $ id_session && $ this -> check ( ) ) { $ p = & $ this -> class_cfg [ 'arch' ] [ 'sessions' ] ; $ this -> db -> update ( $ this -> class_cfg [ 'tables' ] [ 'sessions' ] , [ $ p [ 'id_user' ] => $ this -> id , $ p [ 'sess_id' ] => $ this -> session -> get_id ( ) , $ p [ 'ip_address' ] => $ this -> ip_address , $ p [ 'user_agent' ] => $ this -> user_agent , $ p [ 'opened' ] => 1 , $ p [ 'last_activity' ] => date ( 'Y-m-d H:i:s' ) , $ p [ 'cfg' ] => json_encode ( $ this -> sess_cfg ) ] , [ $ p [ 'id' ] => $ id_session ] ) ; } else { $ this -> set_error ( 13 ) ; } return $ this ; }
docstring: Saves the session config in the database.
  
  @return $this
docstring_tokens: Saves the session config in the database .