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

Reply via email to