This looks cool for me but I have one question. This is part of your plugin
isnt it? And that plugin is child of Zend_Controller_Plugin_Abstract object?

> -----Original Message-----
> From: Michael Patrick [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 16, 2007 11:09 AM
> To: [email protected]
> Subject: Re: [fw-general] Undefined controller
> 
> Jakub Podhorský wrote:
> > I want to check if this controller exist and if it doesnt I want to
> redirect
> > it on some NotFoundController or any default or by myself defined
> > controller.
> 
> I do this using the preDispatch hook of a front controller plugin.
> 
> public function preDispatch(Zend_Controller_Request_Abstract $request) {
>       $disp = Zend_Controller_Front::getInstance()->getDispatcher();
> 
> 
>       if ( !$disp->isDispatchable($request) ) {
>               $request->setModuleName('default');
>               $request->setControllerName('error');
>               $request->setActionName('error404');
>       }
> }
> 
> if the thing doesn't exist (  /registerxxx   instead of /register  for
> example ) then they get bounced to a 404 page.  It has worked so far for
> me.

Reply via email to