1

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

$redirector = new Zend_Controller_Action_Helper_Redirector();
$redirector->gotoUrl('/');
Shakti Singh
  • 84,385
  • 21
  • 134
  • 153
victor
  • 31
  • 1
  • 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 Jun 02 '11 at 08:49

1 Answers1

5

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.

Garry
  • 1,455
  • 1
  • 15
  • 34