public function __construct($dbConnection, $name, $tableName = 'session', $lifetime = 3600, $path = null, $domain = null, $secure = false) { parent::__construct($dbConnection); $this->tableName = $tableName; $this->sessionName = $name; $this->lifetime = $lifetime; $this->path = $path; $this->domain = $domain; $this->secure = $secure; $this->sessionId = $_COOKIE[$name]; if (rand(0, 50) == 1) { $this->_gc(); } if (strlen($this->sessionId) < 32) { $this->_startNewSession(); } else { if (!$this->_validateSession()) { $this->_startNewSession(); } } }
public function __construct() { parent::__construct(); }