-- Xorock <[email protected]> wrote
(on Monday, 10 August 2009, 04:12 AM -0700):
> I have just discovered that paths for view helpers are automaticaly set for
> any module except of default. Why is it so?
> 
> Module "test":
> Test_View_Helper_:
> [...]/application/modules/test/views/helpers/:[...]/application/modules/test/views/helpers/
> Zend_View_Helper_: Zend/View/Helper/
> 
> But for "default" module there is only: Zend_View_Helper_:
> Zend/View/Helper/. Why not Default_View_Helper?

We setup view helper paths for modules automatically to enforce the idea
of using a module prefix for classes underneath a module (this helps
prevent naming collisions between modules).

However... from the very beginning, the default class prefix for custom
prefix paths in Zend_View was to use the "Zend_View_*" prefix, and we
chose to do that for the default module to simplify things. Since then,
I've had reason to regret that decision, but changing it at this point
would be a backwards compatibility break for many applications.

You can always setup your own prefix path for your default module, and
Zend_View will find the helpers successfully.

-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/

Reply via email to