mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-06-04 13:04:54 +02:00
11 lines
285 B
Markdown
11 lines
285 B
Markdown
# Decorator
|
|
|
|
## Purpose
|
|
|
|
To dynamically add new functionality to class instances.
|
|
|
|
## Examples
|
|
|
|
* Zend Framework: decorators for `Zend_Form_Element` instances
|
|
* Web Service Layer: Decorators JSON and XML for a REST service (in this case, only one of these should be allowed of course)
|