zend framework - How can I setup View helpers in the views directory? -


i want setup helpers directory under views , place view helpers there.

i have setup test view helper in application/my/app/view/helper/

i declared class so: class my_app_view_helper_test extends zend_view_helper_abstract

i setup the bootstrap.php file so: $view->sethelperpath(application_path.'/my/app/view/helper','my_app_view_helper');

this working perfectly. learned zendcasts. cannot set way want to. how set helpers in views/helpers/ ? rules regarding directory naming conversion? use plural , use capitalization when naming directories?

i thank in advance help.

sincerely, complete noob

you can have helper named application_view_helper_myhelper in application/views/helpers.

in bootstrap should have following:

$view->sethelperpath(application_path.'/views/helpers','application_view_helper'); 

here, register new plugin prefix view helpers - application_view_helper , point zend framework classes prefix in following path - application_path.'/views/helpers


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -