I have a plugin in my Zend Framework application that checks login status after every request, and reroutes the user to the login action if their session is invalid or expired. I would like to cache the previous request action so that, after a successful login attempt, I can redirect them back to their previous request.
I have found the documentation on the setActionController() method, but I can't find anything on a "getActionController()" method. Does one exist? If so, does anyone have any information they could link me to on it? If not, what's the best way to achieve my goal?
Zend Framework is a collection of professional PHP packages with more than 570 million installations. It can be used to develop web applications and services using PHP 5.6+, and provides 100% object-oriented code using a broad spectrum of language features.
In the default routing, both the controller and the action are always passed along with the request.
$controller = $this->getRequest()->getControllerName(); $action = $this->getRequest()->getActionName();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With