Files
DesignPatternsPHP/Structural/Composite/TextElement.php
2019-12-14 13:41:03 +01:00

19 lines
316 B
PHP

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