News Feed
Sections




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

Evan Coury:
Creating a simple view helper in Zend Framework 2
August 13, 2012 @ 13:24:10

Evan Coury has a new post today showing how to create a simple view helper in a Zend Framework 2 based application.

This post will show you how to create a simple view helper in Zend Framework 2. In this example, our view helper will simply return the full, absolute URL of the current page/request.

Code for the example is included, showing how to pull in the namespaced dependencies and extend the AbstractHelper to define the simple view helper. The "__invoke" method is used to handle the functionality and the configuration for the helper is defined in the Module's "getViewHelperConfig" options. You can find out more about the View Helpers in Zend Framework 2 in their manual page.

0 comments voice your opinion now!
zendframework2 view helper tutorial introduction


blog comments powered by Disqus

Similar Posts

Community News: PHP Tutorial Site - GoodPHPTutorials.com

Matthew Weier O'Phinney's Blog: Rendering Zend_Form decorators individually

PHPRiot.com: Zend Framework 101: Zend_Registry

Oracle Coherence Blog: Getting Started With The Coherence Memcached Adaptor (and PHP)

Matthew Weier O'Phinney: RESTful APIs with ZF2, Part 3


Community Events

Don't see your event here?
Let us know!


symfony2 release library introduction interview api laravel performance version community series podcast opinion example framework php7 voicesoftheelephpant conference xdebug extension

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework