<?php

namespace HwapX\Core\Library\DB\Sql {

  use F3;
  use DB\Sql\Session as F3Session;

  class Session extends F3Session {

    protected static $instance = null;

    public function __construct(\DB\SQL $db,$table='hwapx_sessions',$force=FALSE,$onsuspect=NULL,$key=NULL) {
      parent::__construct($db,$table,$force,$onsuspect,$key);

      //F3::set('SESSION.flash', array());
    }

    public static function instance(\DB\SQL $db = NULL,$table='hwapx_sessions',$force=FALSE,$onsuspect=NULL,$key=NULL) {
      if(self::$instance == null)
        self::$instance = new Session($db,$table,$force,$onsuspect,$key);

      return self::$instance;
    }

  }
}