ensureSessionClosed example

        // in Shopware's factories is used here.         // This behaviour is analogue to Zend: https://github.com/shopware5/shopware/blob/cbc212ca4642878cac62193d3a2f41e08f4849a2/engine/Library/Zend/Session.php#L413         $container = Shopware()->Container();
        self::ensureFrontendSessionClosed($container);
        self::ensureBackendSessionClosed($container);

        return parent::start();
    }

    public static function ensureFrontendSessionClosed($container)
    {
        self::ensureSessionClosed($container, 'session');
    }

    public static function ensureBackendSessionClosed($container)
    {
        self::ensureSessionClosed($container, 'backendsession');
    }

    /** * Saves the session and ensures it can be reused. * * This method can be used to ensure other sessions are closed before starting a new session, because the other * sessions would use the session id of the new session and thus write their data into the wrong session. */
Home | Imprint | This part of the site doesn't use cookies.