PHP Classes

Decorate Anything: Implement the decorator design pattern

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings  
2014-06-23 (10 months ago) RSS 2.0 feedNot enough user ratingsTotal: 861 This week: 1All time: 3,798 This week: 1,242Up
Version License PHP version Categories  
decorate-anything 1.0BSD License5.2.6PHP 5, Design Patterns
Description Author  

This class implement the decorator design patterns.

It implements a base abstract class that should be extended by decorator classes that wrap the result of the wrapped class objects.

When the decorator classes accesses the base decorator functions or variables, the abstract decorator class redirects the access to the wrapped class objects.

Innovation Award  
PHP Programming Innovation award nominee
December 2009
Number 5

Prize: One book of choice by Packt
Decorator is a design pattern intended to change the outcome of programming component using another independent component.

This class provides a generic PHP implementation of the decorator design pattern allowing to wrap the functionality of any object with decorator classes without having to inherit from the wrapped object classes.

Manuel Lemos
Picture of Fabian Schmengler
Name: Fabian Schmengler is available for providing paid consulting. Contact Fabian Schmengler .
Classes: 6 packages by
Country: Germany Germany
Age: 32
All time rank: 109971 in Germany Germany
Week rank: 391 Up15 in Germany Germany Up
Innovation award
Innovation award
Nominee: 4x

  Files folder image Files  
File Role Description
Plain text file decorateanything.lib.php Aux. Include this file to use the package
Plain text file AbstractDecorator.php Class The AbstractDecorator class
Accessible without login Plain text file example.php Example "Hello World" example to demonstrate simple usage
Plain text file license.txt Lic. BSD License
Plain text file README Data Github README
Accessible without login Plain text file readme.txt Doc. Short class description

 Version Control Unique User Downloads Download Rankings  
 16%Total:861All time:3,798
 This week:1This week:1,242Up
 User Comments (1)