-- Jurriën Stutterheim <[EMAIL PROTECTED]> wrote (on Tuesday, 18 March 2008, 03:28 PM +0100): > Here you go :-) http://framework.zend.com/issues/browse/ZF-2910
Thanks! > On Mar 18, 2008, at 2:28 PM, Matthew Weier O'Phinney wrote: > >> -- Jurriën Stutterheim <[EMAIL PROTECTED]> wrote >> (on Tuesday, 18 March 2008, 01:58 PM +0100): >>> Getting the module directory can be used for access to the :module/models >>> directory, or custom directories inside the module directory. E.g. >>> :module/forms , :module/config (for module specific configs) >>> >>> Of course it's easy to do dirname($controllerDirectory), but it would be >>> more convenient to have the module directory available from a method >>> inside the frontcontroller. >>> >>> Suggestion for the method signature in the front controller: >>> >>> public function getModuleDirectory($module = null); >>> >>> It returns the module directory for the current module, unless $module is >>> specified. In that case it would return the module directory for the >>> specified $module. >> >> >> That makes sense -- and particularly in light of the proposed >> ModelLoader action helper. Cut and paste that into an issue for the >> issue tracker, please. :-) >> >> >>> Op Di, maart 18, 2008 13:19 schreef Matthew Weier O'Phinney: >>>> -- thurting <[EMAIL PROTECTED]> wrote >>>> (on Monday, 17 March 2008, 11:01 PM -0700): >>>> >>>>> Is the only way to quickly get the current module directory through >>>>> ViewRenderer::getModuleDirectory()? I see why it's there, but it feels >>>>> like a strange place for it. >>>> >>>> That's actually a convenience method for the following, simplified, >>>> code: >>>> >>>> >>>> $front = Zend_Controller_Front::getInstance(); >>>> $request = $front->getRequest(); >>>> $dir = $front->getControllerDirectory($request->getModuleName()); >>>> >>>> >>>> The ViewRenderer needs to determine the current module directory >>>> dynamically in order to set view script paths. No other shipped >>>> components >>>> need such functionality, and so it's self-contained in the ViewRenderer. >>>> >>>> >>>> What do you need this functionality for in a more general sense? >>>> >>>> >>>> -- >>>> Matthew Weier O'Phinney >>>> PHP Developer | [EMAIL PROTECTED] >>>> Zend - The PHP Company | http://www.zend.com/ >>>> >>>> >>>> >>> >>> >> >> -- >> Matthew Weier O'Phinney >> PHP Developer | [EMAIL PROTECTED] >> Zend - The PHP Company | http://www.zend.com/ >> >> > -- Matthew Weier O'Phinney PHP Developer | [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
