public function shutdownObject()
    {
        if ($this->started === true && $this->remote === false) {
            if ($this->metaDataCache->has($this->sessionIdentifier)) {
                // Security context can't be injected and must be retrieved manually
                // because it relies on this very session object:
                $securityContext = $this->objectManager->get(Context::class);
                if ($securityContext->isInitialized()) {
                    $this->storeAuthenticatedAccountsInfo($securityContext->getAuthenticationTokens());
                }

                $this->putData('Neos_Flow_Object_ObjectManager', $this->objectManager->getSessionInstances());
                $this->writeSessionMetaDataCacheEntry();
            }
            $this->started = false;

            $decimals = (integer)strlen(strrchr($this->garbageCollectionProbability, '.')) - 1;
            $factor = ($decimals > -1) ? $decimals * 10 : 1;
            if (rand(1, 100 * $factor) <= ($this->garbageCollectionProbability * $factor)) {
                $this->collectGarbage();
            }
        }
    }
public function shutdownObject()
    {
        if ($this->started === true && $this->remote === false) {
            if ($this->metaDataCache->has($this->sessionIdentifier)) {
                // Security context can't be injected and must be retrieved manually
                // because it relies on this very session object:
                $securityContext = $this->objectManager->get(Context::class);
                if ($securityContext->isInitialized()) {
                    $this->storeAuthenticatedAccountsInfo($securityContext->getAuthenticationTokens());
                }

                $this->putData('Neos_Flow_Object_ObjectManager', $this->objectManager->getSessionInstances());
                $this->writeSessionMetaDataCacheEntry();
            }
            $this->started = false;

            $decimals = (integer)strlen(strrchr($this->garbageCollectionProbability, '.')) - 1;
            $factor = ($decimals > -1) ? $decimals * 10 : 1;
            if (rand(1, 100 * $factor) <= ($this->garbageCollectionProbability * $factor)) {
                $this->collectGarbage();
            }
        }
    }
public function shutdownObject ( ) { if ( $ this -> started === true && $ this -> remote === false ) { if ( $ this -> metaDataCache -> has ( $ this -> sessionIdentifier ) ) { // Security context can't be injected and must be retrieved manually // because it relies on this very session object: $ securityContext = $ this -> objectManager -> get ( Context :: class ) ; if ( $ securityContext -> isInitialized ( ) ) { $ this -> storeAuthenticatedAccountsInfo ( $ securityContext -> getAuthenticationTokens ( ) ) ; } $ this -> putData ( 'Neos_Flow_Object_ObjectManager' , $ this -> objectManager -> getSessionInstances ( ) ) ; $ this -> writeSessionMetaDataCacheEntry ( ) ; } $ this -> started = false ; $ decimals = ( integer ) strlen ( strrchr ( $ this -> garbageCollectionProbability , '.' ) ) - 1 ; $ factor = ( $ decimals > - 1 ) ? $ decimals * 10 : 1 ; if ( rand ( 1 , 100 * $ factor ) <= ( $ this -> garbageCollectionProbability * $ factor ) ) { $ this -> collectGarbage ( ) ; } } }
Shuts down this session

This method must not be called manually – it is invoked by Flow's object
management.

@return void
@throws Exception\DataNotSerializableException
@throws Exception\SessionNotStartedException
@throws NotSupportedByBackendException
@throws \Neos\Cache\Exception
Shuts down this session