public function handleRegenerate()
    {
        // check for invalid call
        if (!$this->wasStarted()) {
            throw new Doozr_Session_Service_Exception(
                'Error while handling Session regeneration! handleRegenerate() must be called after session start().'
            );
        }

        // check if session must be regenerated
        if (($currentCycle = $this->mustRegenerate()) === true) {
            // do regenerate
            $this->regenerate();

            // reset cycle count cause after regenerate we start from scratch
            $currentCycle = 0;
        }

        // store current cycle count in session
        $this->set(self::DEFAULT_REGENERATE_CYCLES_IDENTIFIER, $currentCycle);
    }
public function handleRegenerate()
    {
        // check for invalid call
        if (!$this->wasStarted()) {
            throw new Doozr_Session_Service_Exception(
                'Error while handling Session regeneration! handleRegenerate() must be called after session start().'
            );
        }

        // check if session must be regenerated
        if (($currentCycle = $this->mustRegenerate()) === true) {
            // do regenerate
            $this->regenerate();

            // reset cycle count cause after regenerate we start from scratch
            $currentCycle = 0;
        }

        // store current cycle count in session
        $this->set(self::DEFAULT_REGENERATE_CYCLES_IDENTIFIER, $currentCycle);
    }
public function handleRegenerate ( ) { // check for invalid call if ( ! $ this -> wasStarted ( ) ) { throw new Doozr_Session_Service_Exception ( 'Error while handling Session regeneration! handleRegenerate() must be called after session start().' ) ; } // check if session must be regenerated if ( ( $ currentCycle = $ this -> mustRegenerate ( ) ) === true ) { // do regenerate $ this -> regenerate ( ) ; // reset cycle count cause after regenerate we start from scratch $ currentCycle = 0 ; } // store current cycle count in session $ this -> set ( self :: DEFAULT_REGENERATE_CYCLES_IDENTIFIER , $ currentCycle ) ; }
Handle the regeneration process.

@author Benjamin Carl <opensource@clickalicious.de>

@throws Doozr_Session_Service_Exception
Handle the regeneration process .