views:

66

answers:

1

Does every level of view helpers really have to be added as its own separate path?

What I mean is this. I have found Zend's method of naming and nesting files a great way to organize user.php lives in the object folder and extends object.php. /DisplayObject /Object User.php

I started attempting to organize my view helpers in the same manner, but from what I'm reading, it almost looks like I would have to add the path for every single view helper, in which case they would lose their nested name, as you would only be calling the method name off of view (ie $this->user() instead of $this->displayObject_Object_User() or something to that extent.) The other alternative being having each level that's extended being a proxy to call the correct helper (a la the navigation sub helpers $this->navigation->links()).

That seems like a very poorly thought out design. No?

A: 

ZF use in yours helpers namespaces. For examples.

Zend_View_Helper_Navigation_Breadcrumbs Zend_View_Helper_Navigation_Links Zend_View_Helper_Navigation_Menu

I don't know if is the best way but is the Zend way

your first option like me more.

Pablo Morales