Yep, you need to instantiate the Request if the front controller has not been dispatched. Note that since it's not dispatched it will not have the module/action/controller names yet - needs to be routed first. If you modify the request you should pass it to the front controller's dispatch() method as the first parameter otherwise the front controller will create a second one without your modifications.
I seem to do this a lot when acceptance testing since selenium has a habit of adding the http: spec to the original request uri on a few systems. Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com ----- Original Message ---- From: Richard D Shank <[EMAIL PROTECTED]> To: pat <[EMAIL PROTECTED]> Cc: Zend Framework General <[email protected]> Sent: Saturday, June 2, 2007 5:31:52 AM Subject: Re: [fw-general] getting request object from bootstrap pat wrote: Hi List, How do I get the request object from inside the bootstrap file I was hoping it might be something like frontcontroller->getRequest(); But that dose not seem to work The $_request doesn't get set until the front controller is dispatched. Try this: Zend_Loader::loadClass('Zend_Controller_Request_Http'); $request = new Zend_Controller_Request_Http(); Richard ____________________________________________________________________________________ Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/
