Articles »

Continuing my series on PHP design patterns, today it’s the turn of the Decorator. In contrast to last week’s Strategy Pattern which is used to change the “guts” of a class, the Decorator Pattern is used to extend the behavior of a class with different functionality at run time. This is achieved by implementing a “decorator” class that implements the same interface as the object that you wish to “decorate” and wraps it’s content.
Posted by girish.r 892 days ago (http://www.labelmedia.co.uk)
Discuss  | Bury | Tweet This | Tagged: design patterns php decorator pattern
Add To 

Who Voted for this Story

Comments

No one has commented on this article yet.

Log in to comment or register here.