/** * Constructor */ public function __construct($name = '', $cryptkey = '') { parent::__construct($cryptkey); $this->setName($name); $this->setPath('/'); $this->setDomain(Server::getHost()); $this->setSecure(Server::isSecure()); }
/** * Constructor */ public function __construct($name = '', $expire = null) { // factory options $this->setOption('name', 'session'); $this->setOption('cookie_lifetime', 0); $this->setOption('cookie_path', '/'); $this->setOption('cookie_domain', Server::getHost()); $this->setOption('cookie_secure', Server::isSecure()); $this->setOption('cookie_httponly', true); $this->setOption('use_only_cookies', true); $this->setOption('use_trans_sid', false); $this->setOption('entropy_file', '/dev/urandom'); $this->setOption('entropy_length', 256); $this->setOption('hash_function', 'sha256'); $this->setOption('hash_bits_per_character', 6); $this->setOption('gc_maxlifetime', 86400); // 24h // set custom values $this->setName($name); $this->setExpire($expire); }
/** * Resolve check for SSL request */ public function resolveIsSecure($default = false) { $this->_secure = Server::isSecure(); }