public function setRegenerateCycles($cycles = self::DEFAULT_REGENERATE_CYCLES)
    {
        // do we need to do anything? cause a "0" means deactivated!
        $this->regenerateCycles = $cycles;

        // set only if cycle count is given
        if ($cycles > 0) {
            // execute right after session start
            $this->callStack['start']['regenerate'] = [
                $this,
                'handleRegenerate',
            ];
        } else {
            // remove from callstack if exists
            if (isset($this->callStack['start']['regenerate'])) {
                unset($this->callStack['start']['regenerate']);
            }
        }
    }
public function setRegenerateCycles($cycles = self::DEFAULT_REGENERATE_CYCLES)
    {
        // do we need to do anything? cause a "0" means deactivated!
        $this->regenerateCycles = $cycles;

        // set only if cycle count is given
        if ($cycles > 0) {
            // execute right after session start
            $this->callStack['start']['regenerate'] = [
                $this,
                'handleRegenerate',
            ];
        } else {
            // remove from callstack if exists
            if (isset($this->callStack['start']['regenerate'])) {
                unset($this->callStack['start']['regenerate']);
            }
        }
    }
public function setRegenerateCycles ( $ cycles = self :: DEFAULT_REGENERATE_CYCLES ) { // do we need to do anything? cause a "0" means deactivated! $ this -> regenerateCycles = $ cycles ; // set only if cycle count is given if ( $ cycles > 0 ) { // execute right after session start $ this -> callStack [ 'start' ] [ 'regenerate' ] = [ $ this , 'handleRegenerate' , ] ; } else { // remove from callstack if exists if ( isset ( $ this -> callStack [ 'start' ] [ 'regenerate' ] ) ) { unset ( $ this -> callStack [ 'start' ] [ 'regenerate' ] ) ; } } }
Configures the regeneration of the Session-Id by given cycles.

@param int $cycles The count of cycles used for regeneration. 0 = disabled,
1 = on every request ... 8 = on each 8th request ...

@author Benjamin Carl <opensource@clickalicious.de>
Configures the regeneration of the Session - Id by given cycles .