/** * Sets the maximum expire time * * @param integer $time Time in seconds * @param bool $add Add time to current expire time or not * * @static * @access public * @return void */ function setExpire($time, $add = false) { if ($add) { if (!isset($_SESSION['__HTTP_Session_Expire_TS'])) { $_SESSION['__HTTP_Session_Expire_TS'] = time() + $time; } // update session.gc_maxlifetime $currentGcMaxLifetime = HTTP_Session::setGcMaxLifetime(null); HTTP_Session::setGcMaxLifetime($currentGcMaxLifetime + $time); } elseif (!isset($_SESSION['__HTTP_Session_Expire_TS'])) { $_SESSION['__HTTP_Session_Expire_TS'] = $time; } }
/** * setGcMaxLifetime() * * @access public * @param integer $iGcMaxLifetime * @return void */ function setGcMaxLifetime($iGcMaxLifetime) { $iCurrentGcMaxLifetime = parent::setGcMaxLifetime(); parent::setGcMaxLifetime($iCurrentGcMaxLifetime + $iGcMaxLifetime); }