In fact I never redirect from a module..
But to cut the code size down and make it more clear.. I do some exception.
I have function what check if user is logged or not, if not, it save
the request_uri where user was trying to go, put a message into
session to show to user at next page(transitory message), and redirect
to the login page and halt the exection of current script.
Something like AClass::haltIfNotLogged(); into every init() of
controllers what need user authentication..
Maybe I should put this functionality into a helper ?
How you would resolve this in a more clean fashion ?
Repeating the same code all over controllers is not really cool..
On Dec 3, 2007 5:32 AM, Peter Lauri <[EMAIL PROTECTED]> wrote:
> Why don't you redirect from the controller? I'd never redirect from a
> model. Do a if(MODELCHECK) {redirect } inside of the controller
> instead. /Peter
>
>
> On Mon, 2007-12-03 at 01:41 +0100, Nicolae Namolovan wrote:
> > I need a basic url redirect, how can I do that with ZF ?
> > I'd prefer without any object creation, any static method ?
> > Looked at the 'Redirector.php', but can't really find any static
> > function for my purpose...
> >
> > A basic task, it seem to me easier just to write my own function, but
> > don't really want cuz I already have ZF..
> >
>
>
--
Sincerely,
Nicolae Namolovan.