Files
DesignPatternsPHP/Structural/Composite/TextElement.php
2019-08-17 21:58:04 +02:00

23 lines
353 B
PHP

<?php
declare(strict_types=1);
namespace DesignPatterns\Structural\Composite;
class TextElement implements RenderableInterface
{
/**
* @var string
*/
private $text;
public function __construct(string $text)
{
$this->text = $text;
}
public function render(): string
{
return $this->text;
}
}