News Feed
Sections




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

DevShed:
Handling Cookies and File Data with the Factory Pattern in PHP 5
July 02, 2007 @ 12:56:00

Continuing on with their look at the Factory Pattern (part one), DevShed has part two posted - a look at applying what was learned previously into a simple cookie-handling and file manipulation script.

At this stage you should have a more accurate idea of how to include the factory pattern into your own PHP applications, at least at a very basic level. But don't you worry because this scenario is going to change quickly, since in this second tutorial I'm going to teach you how to take advantage of the capacity offered by the pattern to create objects that are capable of saving data to different locations, including files and cookies.

The tutorial starts off by creating the classes needed to save strings and objects based off of the abstract DataSaverFactory class. On top of this, they build the classes to save the cookies and work with the files using the Factory objects.

0 comments voice your opinion now!
php5 factory designpattern cookie file tutorial php5 factory designpattern cookie file tutorial


blog comments powered by Disqus

Similar Posts

Jeremy Johnstone's Blog: PHP parser for OS X plist XML files

Developer.com: Combining an Oracle Database with PHP to Manage Data

PHPBuilder.com: AJAX and PHP Part 3 - Post vs. Get Requests

Klaus Graefensteiner's Blog: Climbing the CodeIgniter PHP MVC framework learning curve

HowTo Forge: Installing Lighttpd With PHP5 And MySQL Support On Fedora 7


Community Events





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


introduction laravel unittest install framework developer experience release testing symfony2 list community series opinion threedevsandamaybe podcast interview refactor language code

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