News Feed
Sections




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

DevShed:
Processing File Data with Template Classes in PHP 5
March 26, 2007 @ 12:17:00

With this new tutorial posted today, DevShed polishes off yet another of their design patterns series - their look at using the Templating pattern in PHP5.

Over the course of this last tutorial I'm going to provide you with a few more examples of how to build template classes with PHP 5. More specifically speaking, what you're going to learn here will be how to create a set of template objects that will control the visual appearance of data fetched from different files.

They work from the group up, starting over with the creation of the base file handling class and working their way up to the templating class. Attach a few subclasses (to generate each of the data blocks needed) and check it out in action. Their example pulls in the template, parses through it and assigns the information to the subclass functions to output different formats of the data - plain text, HTML, and XML.

0 comments voice your opinion now!
php5 processing template file class designpattern php5 processing template file class designpattern


blog comments powered by Disqus

Similar Posts

Dagfinn Reiersol's Blog: Real programming with PHP 5.3 (part 2): JavaScript-style classes

Mike Wallner's Blog: Upgrading to 5.2

DevShed: Handling File Data with the Facade Pattern in PHP 5

DevShed: Defining the Core Structure of a PHP Blogger

SecurityReason: Three Advisories for PHP 5.2.4 (dl, iconv_substr & setlocale)


Community Events

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


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

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