protected function runLegacyKernelCallback($callback)
    {
        $this->persistenceCacheClearer->switchOff();
        $this->httpCacheClearer->switchOff();

        // Initialize legacy kernel if not already done
        if ($this->legacyKernel instanceof Closure) {
            $legacyKernelClosure = $this->legacyKernel;
            $this->legacyKernel = $legacyKernelClosure();
        }

        $return = $this->legacyKernel->runCallback(
            $callback,
            false,
            false
        );

        $this->persistenceCacheClearer->switchOn();
        $this->httpCacheClearer->switchOn();

        return $return;
    }
protected function runLegacyKernelCallback($callback)
    {
        $this->persistenceCacheClearer->switchOff();
        $this->httpCacheClearer->switchOff();

        // Initialize legacy kernel if not already done
        if ($this->legacyKernel instanceof Closure) {
            $legacyKernelClosure = $this->legacyKernel;
            $this->legacyKernel = $legacyKernelClosure();
        }

        $return = $this->legacyKernel->runCallback(
            $callback,
            false,
            false
        );

        $this->persistenceCacheClearer->switchOn();
        $this->httpCacheClearer->switchOn();

        return $return;
    }
protected function runLegacyKernelCallback ( $ callback ) { $ this -> persistenceCacheClearer -> switchOff ( ) ; $ this -> httpCacheClearer -> switchOff ( ) ; // Initialize legacy kernel if not already done if ( $ this -> legacyKernel instanceof Closure ) { $ legacyKernelClosure = $ this -> legacyKernel ; $ this -> legacyKernel = $ legacyKernelClosure ( ) ; } $ return = $ this -> legacyKernel -> runCallback ( $ callback , false , false ) ; $ this -> persistenceCacheClearer -> switchOn ( ) ; $ this -> httpCacheClearer -> switchOn ( ) ; return $ return ; }
Executes a legacy kernel callback.

Does the callback with both post-reinitialize and formtoken checks disabled.

@param callable $callback

@return mixed
Executes a legacy kernel callback .