public function regenerate($destroy = false, $lifetime = null)
    {
        if (!$this->isStarted()) {
            return false;
        }
        
        if (null !== $lifetime) {
            ini_set('session.cookie_lifetime', $lifetime);
        }
    
        \Wslim\Ioc::logger('session')->debug(sprintf('[%s]regenerate', static::getId()));
        
        return session_regenerate_id($destroy);
    }
public function regenerate($destroy = false, $lifetime = null)
    {
        if (!$this->isStarted()) {
            return false;
        }
        
        if (null !== $lifetime) {
            ini_set('session.cookie_lifetime', $lifetime);
        }
    
        \Wslim\Ioc::logger('session')->debug(sprintf('[%s]regenerate', static::getId()));
        
        return session_regenerate_id($destroy);
    }
public function regenerate ( $ destroy = false , $ lifetime = null ) { if ( ! $ this -> isStarted ( ) ) { return false ; } if ( null !== $ lifetime ) { ini_set ( 'session.cookie_lifetime' , $ lifetime ) ; } \ Wslim \ Ioc :: logger ( 'session' ) -> debug ( sprintf ( '[%s]regenerate' , static :: getId ( ) ) ) ; return session_regenerate_id ( $ destroy ) ; }
Regenerates the session

@param bool $destroy True to destroy the current session
@param int $lifetime The lifetime of the session cookie in seconds
@return bool True if regenerated, false otherwise
Regenerates the session