News Feed
Sections




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

DevShed:
PHP Closures as View Helpers Lazy-Loading File Data
January 30, 2012 @ 13:08:28

In the second part of their look at using closures in PHP as view helpers, DevShed improves upon their original code by adding some additional classes and using them in the closures.

The best way to show you how using anonymous functions can help you to develop more efficient OO applications is with some functional, hands-on examples. With this idea in mind, in the installment that preceded this one, I implemented an extendable template system. This system could spawn view objects and render the template files associated with these objects.

In this second part of the (two-part) series they include "Serializer" and "FileHandler" classes and show how to use them inside of the closures to lazy-load in data from an external file and work with it as serialized content.

0 comments voice your opinion now!
tutorial closure lazyload file serialize view helper


blog comments powered by Disqus

Similar Posts

ThinkPHP Blog: Make the download of large files with PHP (and lighty) very easy

Kevin Schroeder's Blog: You want to do WHAT with PHP? Chapter 6 & 7

DevShed: Authentication Scripts for a User Management Application

Secunia.com: phpChess Community Edition Multiple File Inclusion

Tim Koschuetzki's Blog: How To Transform HTML To Textile Markup - The CakePHP TextileHelper Revisite


Community Events

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


laravel series community library symfony2 install introduction opinion interview php7 example configure performance framework api composer application release conference podcast

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