_lifetime = (int) ini_get('session.gc_maxlifetime'); } else { $this->_lifetime = (int) $lifetime; } } /** * 获取 Session 生命周期 * * @return integer */ public function getLifetime() { return $this->_lifetime; } /** * 设置 Session 在更新后是否同时更新时间 * 如果设置为否,那么 Session 的生命不会得到延长 * * @param boolean $overrideLifetime */ public function setOverrideLifetime($overrideLifetime) { $this->_overrideLifetime = (boolean) $overrideLifetime; } /** * Retrieve whether or not the lifetime of an existing session should be overridden * * @return boolean */ public function getOverrideLifetime() { return $this->_overrideLifetime; } /** * Open Session * * @param string $save_path * @param string $name * @return boolean */ public function open($savePath, $name) { $this->_sessionSavePath = $savePath; $this->_sessionName = $name; return true; } /** * Close session * * @return boolean */ public function close() { return true; } } // End ^ Native EOL ^ encoding