public function mustRegenerate()
    {
        // try to read counter from session
        try {
            $currentCycle = $this->get(self::DEFAULT_REGENERATE_CYCLES_IDENTIFIER);
        } catch (Doozr_Session_Service_Exception $e) {
            $currentCycle = 0;
        }

        // increase cycle
        ++$currentCycle;

        // check if current cycle is the one for regenerate
        if ($currentCycle == $this->getRegenerateCycles()) {
            // regenerate
            return true;
        }

        // do not regenerate
        return $currentCycle;
    }
public function mustRegenerate()
    {
        // try to read counter from session
        try {
            $currentCycle = $this->get(self::DEFAULT_REGENERATE_CYCLES_IDENTIFIER);
        } catch (Doozr_Session_Service_Exception $e) {
            $currentCycle = 0;
        }

        // increase cycle
        ++$currentCycle;

        // check if current cycle is the one for regenerate
        if ($currentCycle == $this->getRegenerateCycles()) {
            // regenerate
            return true;
        }

        // do not regenerate
        return $currentCycle;
    }
public function mustRegenerate ( ) { // try to read counter from session try { $ currentCycle = $ this -> get ( self :: DEFAULT_REGENERATE_CYCLES_IDENTIFIER ) ; } catch ( Doozr_Session_Service_Exception $ e ) { $ currentCycle = 0 ; } // increase cycle ++ $ currentCycle ; // check if current cycle is the one for regenerate if ( $ currentCycle == $ this -> getRegenerateCycles ( ) ) { // regenerate return true ; } // do not regenerate return $ currentCycle ; }
Returns status of required session id regeneration.

@author Benjamin Carl <opensource@clickalicious.de>

@return bool TRUE if Session-Id must be regenerated, FALSE if not
Returns status of required session id regeneration .