By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,919 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,919 IT Pros & Developers. It's quick & easy.

The Builder Design Pattern using PHP5

P: n/a
Last fall I started a series of design pattern examples using PHP5. I
think the last pattern I did was the Singleton in January. Getting
back to it here is my first cut at the Builder pattern.

http://www.fluffycat.com/PHP-Design-Patterns-Builder/

In the builder pattern a director and builder work togther to build an
object. The director controls the building and specifies any
variations that can be done with the object. The builder knows how to
build the object.

There are a couple things I'm not 100% sure of yet in my example.

I use of a formatPage() function in my HTMLPage.php. I'm not sure if
it should be there or in the builder.

I only have a HTMLPage builder shown, but perhaps to be a complete
example a contrasting XMLPage or RSSPage builder would be helpful.
May 4 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.