1
votes

How to redirect in models or not in contrroler? use standart zend redirector helper

$redirector = new Zend_Controller_Action_Helper_Redirector();
$redirector->gotoUrl('/');
1
Why the down votes? No question, redirecting in models is a Bad Thing (tm), but does the OP need to penalized simply for asking? - David Weinraub

1 Answers

5
votes

You should never redirect from a model, redirection should only occur in controllers. Models should be designed in a black box mannor, independant of the controller.