views:

42

answers:

1

Is it possible? How?

Let's say I have the ff:

class My_Redirect
{
  function test()
  {
     // some testing
     // another testing
     // redirect script
  }
}

Thanks in advance!

+2  A: 

Yes it is possible, speaking technically. But since the 'controller' part of a MVC application does the request/response handling, I would not recommend it. The library can be seen as part of your 'models'.

If you want to redirect, you can use the controller helper redirector, you can use the Zend_Controller_Response object, or you can use the plain old php header() function (not recommended).