35 lines
544 B
PHP
35 lines
544 B
PHP
<?php
|
|
|
|
namespace App\Node;
|
|
|
|
use App\Text\Text;
|
|
|
|
class Node
|
|
{
|
|
public function __construct(
|
|
private int $id,
|
|
private string $title,
|
|
private Text $text,
|
|
private ?Node $parentNode,
|
|
) {}
|
|
|
|
public function getId(): int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getTitle(): string
|
|
{
|
|
return $this->title;
|
|
}
|
|
|
|
public function getText(): Text
|
|
{
|
|
return $this->text;
|
|
}
|
|
|
|
public function getParentNode(): ?Node
|
|
{
|
|
return $this->parentNode;
|
|
}
|
|
}
|