cs Decorator

This commit is contained in:
Dominik Liebler
2013-09-11 16:18:40 +02:00
parent 9b3389ba4a
commit 79f94ba501
8 changed files with 66 additions and 32 deletions

View File

@@ -2,13 +2,20 @@
namespace DesignPatterns\Decorator;
/**
* Class RenderInJson
*/
class RenderInJson extends Decorator
{
/**
* render data as JSON
*
* @return mixed|string
*/
public function renderData()
{
$output = $this->_wrapped->renderData();
$output = $this->wrapped->renderData();
return json_encode($output);
}
}