News Feed
Sections




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

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

Web Development Blog: Ajax requests using jQuery and PHP

Evan Coury's Blog: Using Zend\Dbs TableGateway & HydratingResultSet to return rows as custom enties

DevShed: Auto Loading Classes in PHP 5

PHP-Tip-a-Day: PHP Tutorial: The Allegory of The Factory Pattern

DevShed: Using Abstract Factory Classes in PHP 5 to Work with Online Forms


Community Events





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


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

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