implement Text entity

This commit is contained in:
yggverse 2024-06-24 03:07:12 +03:00
parent 940819fdb7
commit ed5b33c708

37
src/Entity/Text.php Normal file
View file

@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
namespace Yggverse\Gemtext\Entity;
class Text
{
private string $_data;
public function __construct(
string $data
) {
$this->setData(
$data
);
}
public function setData(
string $data
): void
{
$this->_data = trim(
$data
);
}
public function getData(): string
{
return $this->_data;
}
public function toString(): string
{
return $this->_data;
}
}