create Entity namespace

This commit is contained in:
yggverse 2024-06-23 19:22:56 +03:00
parent c23877166c
commit 207f785d7f
3 changed files with 212 additions and 0 deletions

67
src/Entity/Line.php Normal file
View file

@ -0,0 +1,67 @@
<?php
declare(strict_types=1);
namespace Yggverse\Gemtext\Entity;
class Line
{
private string $_data;
private bool $_escaped;
private ?int $_number;
public function __construct(
string $data = '',
bool $escaped = false,
?int $number = null
) {
$this->setData(
$data
);
$this->setEscaped(
$escaped
);
$this->setNumber(
$number
);
}
public function getData(): string
{
return $this->_data;
}
public function setData(
string $data
): void
{
$this->_data = $data;
}
public function getEscaped(): bool
{
return $this->_escaped;
}
public function setEscaped(
bool $escaped
): void
{
$this->_escaped = $escaped;
}
public function getNumber(): ?int
{
return $this->_number;
}
public function setNumber(
?int $number
): void
{
$this->_number = $number;
}
}