News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

Zend Developer Zone:
View Helpers in Zend Framework
0 comments :: posted Tuesday April 29, 2008 @ 14:38:27
voice your opinion now!

The Zend Developer Zone has posted a new tutorial (from Matthew Weier O'Phinney) about a handy feature of the Zend Framework's view layer - view helpers that can be added in and reused across an application to do some pretty cool stuff.

A View Helper is simply a class that follows particular naming conventions, When attached to a view object, you can call the helper as if it were a method of the view object itself. The View object retains helper instances, which means that they retain states between calls.

View helpers can be use to do things like manipulate view data for more complex operations and carrying over data between two views, limiting the number of fetches that have to be done. He shows how to create a simple helper - My_Helper_FooBar - that just appends "fooBar " to whatever's passed in. He also talks about some of the default view helpers (like form fields), partials, the doctype() helper, capturing/caching content to be used later and the use of placeholders.

tagged with: zendframework view helper form partial doctype capture placeholder


Matthew Weir O'Phinney's Blog:
Using Zend_View Placeholders to Your Advantage
0 comments :: posted Wednesday March 19, 2008 @ 12:04:05
voice your opinion now!

On his blog today, Matthew Weir O'Phinney offers some helpful advice about using the placeholder functions of the Zend_View component (like headScript or headLink) to make coding in the Zend Framework that much easier:

Somebody asked for some examples of how I use the headLink(), headScript(), and other placeholder helpers, so I thought I'd take a crack at that today.

He looks at the different categories of placeholders and illustrates with examples of each: Doctype Hinting, Content Aggregation, Capturing Content and finally, putting them all together into a custom layout that uses docType, headLink, headStyle and headScript.

tagged with: zendframework zendview component placeholder doctype content


PEAR application mysql conference ajax security release zend database framework zendframework developer code cakephp pecl package releases book job PHP5

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