/** * Executes a legacy kernel callback * * Does the callback with both post-reinitialize and formtoken checks disabled. * * @param callable $callback * * @return mixed */ protected function runLegacyKernelCallback($callback) { // 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); }
/** * Executes a legacy kernel callback. * * Does the callback with both post-reinitialize and formtoken checks disabled. * * @param callable $callback * * @return mixed */ 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; }