majidkarimizadeh / decorator-design-pattern-sample Goto Github PK
View Code? Open in Web Editor NEWDecorator pattern allows us to add new functionality to an existing object. This pattern requires a decorator class which wraps the original class in order to provide additional functionality. For now, we are going to implement a simple example using PHP and see how the decorator works.