mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-05-31 11:10:08 +02:00
27 lines
498 B
PHP
27 lines
498 B
PHP
<?php
|
|
|
|
namespace DesignPatterns\AbstractFactory\Json;
|
|
|
|
use DesignPatterns\AbstractFactory\Picture as BasePicture;
|
|
|
|
/**
|
|
* Class Picture
|
|
*
|
|
* Picture is a concrete image for JSON rendering
|
|
*
|
|
* @package DesignPatterns\AbstractFactory\Json
|
|
*/
|
|
class Picture extends BasePicture
|
|
{
|
|
|
|
/**
|
|
* some crude rendering from JSON output
|
|
*
|
|
* @return string
|
|
*/
|
|
public function render()
|
|
{
|
|
return json_encode(array('title' => $this->_name, 'path' => $this->_path));
|
|
}
|
|
|
|
} |