Thank you for the correction.
Tobias Gies wrote: > To all english readers: the english translations of the comments in > this snippet (in order of appearance): > delete default route > forward exception to response object > no auto plugin > > Greets from Germany :) > > 2007/9/9, Truppe Steven <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>>: > > Problem solved, here the code if someone is interessted: > > In the bootstrap file: > > catch (Exception $e) { > // Default Route löschen > require_once 'Zend/Controller/Router/Rewrite.php'; > $router = new Zend_Controller_Router_Rewrite(); > $router->removeDefaultRoutes(); > > // Exception an Response Objekt übergeben > require_once 'Zend/Controller/Response/Http.php'; > $response = new Zend_Controller_Response_Http(); > $response->setException($e); > > $this->_front->setResponse($response); > $this->_front->setRouter($router); > $this->_unregisterPlugins('Auth'); // kein Auth Plugin > } > > > Truppe Steven wrote: > > Hi, > > > > i have a very simple question related to the dispatcher. > > > > The dispatcher takes the request and the response object > > (->dispatch($request, $response); ). > > So i thought i can just pass my own $request to jump to a certain > > controller:action when dispatch() is called. > > > > But how can i just ignore the actual request (so it is not > dispatched() > > and rendered) and pass my own (that is rendered and dispatched) ? > > > > So for example if /admin/test is given as url it should NOT dispatch > > this url but dispatch another one (for example module:default > > controller:error action:error). > > > > > > This should all happen in the bootstrap file. > > My actual code look something like this: > > > > $this->_request = new Zend_Controller_Request_Http(); > > $this->_request->setModuleName('default') > > ->setControllerName('error') > > ->setActionName('error') > > ->setDispatched(false); > > > > Zend_Controller_Front::getInstance()->setRequest($this->_request); > > > > and on dispatch() is pass the request object: > > > > $front->dispatch($this->_request, null); > > > > > > What am i doing wrong ? > > > > > > best regards, > > Truppe Steven > > > > > >
