src/Chiron/Http/Session/SessionManager.php
public static function destroy2()
    {
        if (self::status() === \PHP_SESSION_ACTIVE) {
            //session_unset();
            self::flush();
            session_destroy();
            session_write_close();

            // TODO : utiliser 42000 comme nombre au lieu de -1heure => https://github.com/odan/slim-session/blob/master/src/Slim/Session/Adapter/PhpSessionAdapter.php#L39
            // delete the session cookie => lifetime = -1h (60 * 60)
            if (ini_get('session.use_cookies')) {
                $params = session_get_cookie_params();
                setcookie(
                    session_name(),
                    '',
                    time() - 3600,
                    $params['path'],
                    $params['domain'],
                    $params['secure'],
                    $params['httponly']
                );
            }
        }

        //return $this->clear(false);
    }
public static function destroy2()
    {
        if (self::status() === \PHP_SESSION_ACTIVE) {
            //session_unset();
            self::flush();
            session_destroy();
            session_write_close();

            // TODO : utiliser 42000 comme nombre au lieu de -1heure => https://github.com/odan/slim-session/blob/master/src/Slim/Session/Adapter/PhpSessionAdapter.php#L39
            // delete the session cookie => lifetime = -1h (60 * 60)
            if (ini_get('session.use_cookies')) {
                $params = session_get_cookie_params();
                setcookie(
                    session_name(),
                    '',
                    time() - 3600,
                    $params['path'],
                    $params['domain'],
                    $params['secure'],
                    $params['httponly']
                );
            }
        }

        //return $this->clear(false);
    }
public static function destroy2 ( ) { if ( self :: status ( ) === \ PHP_SESSION_ACTIVE ) { //session_unset(); self :: flush ( ) ; session_destroy ( ) ; session_write_close ( ) ; // TODO : utiliser 42000 comme nombre au lieu de -1heure => https://github.com/odan/slim-session/blob/master/src/Slim/Session/Adapter/PhpSessionAdapter.php#L39 // delete the session cookie => lifetime = -1h (60 * 60) if ( ini_get ( 'session.use_cookies' ) ) { $ params = session_get_cookie_params ( ) ; setcookie ( session_name ( ) , '' , time ( ) - 3600 , $ params [ 'path' ] , $ params [ 'domain' ] , $ params [ 'secure' ] , $ params [ 'httponly' ] ) ; } } //return $this->clear(false); }
Destroy all session data.

@return $this
Destroy all session data .