mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-14 03:46:25 +02:00
24 lines
410 B
PHP
24 lines
410 B
PHP
<?php
|
|
|
|
namespace DesignPatterns\AbstractFactory\Html;
|
|
|
|
use DesignPatterns\AbstractFactory\Text as BaseText;
|
|
|
|
/**
|
|
* Class Text
|
|
*
|
|
* Text is a concrete text for HTML rendering
|
|
*/
|
|
class Text extends BaseText
|
|
{
|
|
/**
|
|
* some crude rendering from HTML output
|
|
*
|
|
* @return string
|
|
*/
|
|
public function render()
|
|
{
|
|
return '<div>' . htmlspecialchars($this->text) . '</div>';
|
|
}
|
|
}
|