Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rob Allen's Blog:
Zend Framework View Helpers
Mar 14, 2011 @ 12:56:18

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").

tagged: view helper zendframework introduction