function SessionManager() { global $maxWebServiceSessionLifeSpan, $maxWebServiceSessionIdleTime; $now = time(); $this->maxLife = $now + $maxWebServiceSessionLifeSpan; $this->idleLife = $now + $maxWebServiceSessionIdleTime; HTTP_Session::useCookies(false); //disable cookie usage. may this could be moved out constructor? // only first invocation of following method, which is setExpire //have an effect and any further invocation will be have no effect. HTTP_Session::setExpire($this->maxLife); // this method replaces the new with old time if second params is true //otherwise it subtracts the time from previous time HTTP_Session::setIdle($this->idleLife, true); }
/** * setExpire() * * @access public * @param integer $iTime * @return void */ function setExpire($iTime) { parent::setExpire(time() + $iTime, false); }