public function __construct($name = null, $lifetime = 3600, $path = null, $domain = null, $secure = false, $httponly = TRUE)
 {
     if (strlen($name) < 1) {
         $name = '_sess';
     }
     $this->logger = \GTFramework\App::getLogger();
     LOG < 2 ?: $this->logger->log('__construct in NativeSession created with params: name: ' . $name . ' lifetime: ' . $lifetime . ' path: ' . $path . ' domain: ' . $domain . ' secure: ' . $secure . ' httpOnly: ' . $httponly);
     session_name($name);
     session_set_cookie_params($lifetime, $path, $domain, $secure, $httponly);
     session_start();
     $_COOKIE['__sess'] = session_id();
 }
Beispiel #2
0
 /**
  * Protected constructor to prevent creating a new instance of the
  * *Singleton* via the `new` operator from outside of this class.
  */
 private function __construct()
 {
     \GTFramework\Loader::registerNamespace('GTFramework', dirname(__FILE__) . DIRECTORY_SEPARATOR);
     \GTFramework\Loader::registerAutoLoad();
     $this->_config = \GTFramework\Config::getInstance();
     if ($this->_config->_configFolder == NULL) {
         $this->_config->setConfigFolder('../config');
     }
     self::$logger = \GTFramework\Logger::getInstance();
 }