mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-13 03:16:21 +02:00
24 lines
442 B
PHP
24 lines
442 B
PHP
<?php
|
|
|
|
namespace DesignPatterns\AbstractFactory\Html;
|
|
|
|
use DesignPatterns\AbstractFactory\Picture as BasePicture;
|
|
|
|
/**
|
|
* Class Picture
|
|
*
|
|
* Picture is a concrete image for HTML rendering
|
|
*/
|
|
class Picture extends BasePicture
|
|
{
|
|
/**
|
|
* some crude rendering from HTML output
|
|
*
|
|
* @return string
|
|
*/
|
|
public function render()
|
|
{
|
|
return sprintf('<img src="%s" title="%s"/>', $this->path, $this->name);
|
|
}
|
|
}
|