mirror of
https://github.com/YGGverse/gemtext-php.git
synced 2026-03-31 09:45:33 +00:00
67 lines
1 KiB
PHP
67 lines
1 KiB
PHP
<?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 isEscaped(): 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;
|
|
}
|
|
}
|