mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-12 02:46:23 +02:00
23 lines
410 B
PHP
23 lines
410 B
PHP
<?php
|
|
|
|
/*
|
|
* DesignPatternPHP
|
|
*/
|
|
|
|
namespace DesignPatterns\AbstractFactory\Json;
|
|
|
|
use DesignPatterns\AbstractFactory\Picture as BasePicture;
|
|
|
|
/**
|
|
* Picture is a concrete image for JSON rendering
|
|
*/
|
|
class Picture extends BasePicture
|
|
{
|
|
|
|
// some crude rendering from JSON output
|
|
public function render()
|
|
{
|
|
return json_encode(array('title' => $this->_name, 'path' => $this->_path));
|
|
}
|
|
|
|
} |