How to add a view helper directory (zend framework)

后端 未结 5 1800
忘掉有多难
忘掉有多难 2020-12-03 16:59

I begin with ZF (1.9.7), and I want to use View Helpers from a library shared between all my projects. But I can\'t find how to add it directory to the helpers path. My herp

5条回答
  •  佛祖请我去吃肉
    2020-12-03 17:36

    Helper paths are added through Zend_View_Abstract::addHelperPath(). You can call this method directly on an existing View instance.

    Helper paths can also be configured in various ways during bootstrap. Check out the ZF manual chapter on Zend_Application to see how to use Bootstrap classes and resources:

    • http://framework.zend.com/manual/1.12/en/zend.view.helpers.html
    • http://framework.zend.com/manual/1.12/en/zend.application.quick-start.html
    • http://framework.zend.com/manual/1.12/en/zend.application.examples.html
    • http://framework.zend.com/manual/1.12/en/zend.application.available-resources.html#zend.application.available-resources.view

提交回复
热议问题