PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

Rob Allen's Blog: Zend Framework View Helpers

Note: This article was originally published at PHPDeveloper on 15 March 2011.
PHPDeveloper

Rob Allen has written up a post today consolidating some of the knowledge he has about using view helpers in the Zend Framework, starting with the basics and some code along the way.

Zend Framework's Zend_View component supports helper methods known as view helpers. [...] typical Zend Framework project using Zend_Application, such as that generated using the zf command line tool, will have a folder called helpers within the views folder for each module. There will also be a helpers folder within the layouts folder too.

He goes on to show how to introduce custom view helpers into your application and how extending the Zend_View_Helper_Abstract class gives you access to many of the common view functions (like "escape").