public function setKernel(KernelInterface $kernel) { $this->kernel = $kernel; $this->application = new Application($this->kernel); $this->application->setAutoExit(false); }