anonymous
anonymous

Reputation: 1

zend framework - is it possible to make a 'redirect' script in the library

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!

Upvotes: 0

Views: 240

Answers (1)

user228395
user228395

Reputation: 1176

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).

Upvotes: 2

Related Questions