mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-05-23 06:50:15 +02:00
23 lines
408 B
PHP
23 lines
408 B
PHP
<?php
|
|
|
|
/*
|
|
* DesignPatternPHP
|
|
*/
|
|
|
|
namespace DesignPatterns\AbstractFactory\Html;
|
|
|
|
use DesignPatterns\AbstractFactory\Picture as BasePicture;
|
|
|
|
/**
|
|
* Picture is a concrete image for HTML rendering
|
|
*/
|
|
class Picture extends BasePicture
|
|
{
|
|
|
|
// some crude rendering from HTML output
|
|
public function render()
|
|
{
|
|
return sprintf('<img src="%s" title="$s"/>', $this->_path, $this->_name);
|
|
}
|
|
|
|
} |