I have a kernel event listener setup (kernel.controller) to redirect the user if hes not logged in. The event listener is succefully getting called, however im having trouble figuring out how to redirect. Here's what i got:
$cont = $event->getController('testpost');
$event->setResponse($cont);
Which gives me the error:
Fatal error: Call to undefined method SymfonyComponentHttpKernelEventFilterControllerEvent::setResponse()
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…