News Feed
Jobs Feed
Sections




News Archive
DevShed:
The Basics of Using the Factory Pattern in PHP 5
June 26, 2007 @ 11:07:00

DevShed revisits its series on using design patterns in PHP applications with this new tutorial, a look at implementing the Factory pattern in PHP 5.

Summarizing, the factory pattern can be really useful when it comes to creating multiple objects that belong to the same family. In this three-part series I'm going to take a close look at it, and also demonstrate its remarkable functionality by showing you a decent variety of code samples, so you can start quickly including this pattern into your own PHP applications.

They lay the foundation by creating some basic factory classes for working with numeric and associative arrays. On top of this, they create the processing classes to create things like uppercase numeric arrays and lowercase associative arrays. Finally, they give examples of how to put it to use making several different sorts of arrays, including their output.

0 comments voice your opinion now!
factory designpattern php5 tutorial array associative numeric factory designpattern php5 tutorial array associative numeric


blog comments powered by Disqus

Similar Posts

Raphael Stolt's Blog: Logging to MongoDb and accessing log collections with Zend_Tool

Brandon Savage's Blog: Exceptional PHP: Extending The Base Exception Class

Builder.com: Match users to their geo-location with PHP and PEAR Net:Geo

Developer.com: Scaffolding with CakePHP - Managing Your Fantasy Football Team

Till's Blog: Nginx+PHP+FastCGI: Testing your web application with bleeding edge PHP


Community Events











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


interview development database series community zendframework2 phpunit opinion example framework introduction podcast testing unittest api language release code composer functional

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