|
|||
|
I created a BaseAction class which extends Zend_Controller_Action. All my actions extend from this BaseAction.
In this BaseAction class I have a processForm method for validating the $_POST values based on a Zend_Validate chain. This method can be called from all the actions that need to process form data. I want this method to return the $_POST values if the form validates and forward to another action if form doesn't validate. See code below. BaseAction.php PHP Code:
PHP Code:
What I want/need is a way to forward to another action and stop the current action. I know I could return false from processForm if the form doesn't validate and put the processForm statement in the processAction in an if-statement that would call break on false, but this to much code in the action. Does anybody know how to forward instantly to another action and stop going futher in the current action? |
![]() |
| Thread Tools | |
| Display Modes | |
|
|