30 lines
492 B
PHP
30 lines
492 B
PHP
<?php
|
|
|
|
namespace KupShop\KupShopBundle\Util\HtmlBuilder;
|
|
|
|
class Text
|
|
{
|
|
/** @var string */
|
|
private $text;
|
|
/** @var HTML|null */
|
|
private $parent;
|
|
|
|
public function __construct(string $text, ?HTML $parent = null)
|
|
{
|
|
$this->text = $text;
|
|
$this->parent = $parent;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function __toString(): string
|
|
{
|
|
return $this->render();
|
|
}
|
|
|
|
public function render(): string
|
|
{
|
|
return $this->text;
|
|
}
|
|
}
|