News Feed
Sections




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

DevShed:
Working with Strings and the Composite Pattern in PHP 5
March 14, 2007 @ 11:14:00

DevShed has posted the second and last part of a series of two articles based around the Composite design pattern - using it to work with strings in PHP5.

Are you a PHP developer who wants to improve your skills in pattern-based programming in PHP? If the answer to this question is a emphatic yes, then you should begin reading this article now! Welcome to the final part of the series "Implementing the composite pattern with PHP 5." Comprised of two instructive tutorials, this series walks you through the basic concepts of this important design pattern, and shows you how to apply it with some educational examples.

They start by defining a simple StringProcessor class as an abstract interface to build from. From there, they create two other classes - the SingleStringProcessor and the MultipleStringProcessor. Each of these takes in either a single file or multiple filenames and spits back out the value of the string and the length of the string.

0 comments voice your opinion now!
tutorial composite designpattern strings single multiple tutorial composite designpattern strings single multiple


blog comments powered by Disqus

Similar Posts

Mfana Ronald Conco's Blog: RabbitMQ and PHP Part 1

SitePoint PHP Blog: Building a Web App With Symfony 2: Development

DevShed: Defining a Custom Function for File Uploaders with PHP 5

CodeForest.com: Creating simple tasks app with Backbone.js and Slim micro framework (part 1)

NETTUTS.com: How to Read an RSS Feed with PHP - Screencast


Community Events

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


library release version framework development voicesoftheelephpant security series laravel language api php7 podcast introduction opinion unittest community extension interview laravel5

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