-- Waigani <[EMAIL PROTECTED]> wrote (on Thursday, 27 September 2007, 04:10 PM -0700): > $request = Zend_Controller_Front::getInstance()->getRequest(); > print_r($request); > > in the bootstrap index.php prints nothing.
Because it's not yet instantiated. $front->dispatch() creates a request object if none has been set, which is why you don't need to create one typically. However, prior to that, unless you instantiate and attach your own, you won't get on back from getRequest(). > I've tried everyway I can think of to getModuleName() from the > bootstrap with no luck. I also tried $request = new > Zend_Controller_Request_Http(); $request->getModuleName(); It won't contain the module name until *after* routing. The request object, at initialization, is simply an encapsulation of the request environment, and doesn't know how to associate portions of itself with the module, controller, action, etc. The router makes those associations. -- Matthew Weier O'Phinney PHP Developer | [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
