feat: Reader beginning
This commit is contained in:
parent
e90c0a140e
commit
55945adc53
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Domain\Reader\Application\Response;
|
||||
|
||||
final readonly class ChapterContextResponse
|
||||
{
|
||||
public function __construct(
|
||||
private string $id,
|
||||
private string $title,
|
||||
private float $number,
|
||||
private int $totalPages,
|
||||
private ?string $previousChapterId,
|
||||
private ?string $nextChapterId
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
public function getId(): string
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
public function getNumber(): float
|
||||
{
|
||||
return $this->number;
|
||||
}
|
||||
|
||||
public function getTotalPages(): int
|
||||
{
|
||||
return $this->totalPages;
|
||||
}
|
||||
|
||||
public function getPreviousChapterId(): ?string
|
||||
{
|
||||
return $this->previousChapterId;
|
||||
}
|
||||
|
||||
public function getNextChapterId(): ?string
|
||||
{
|
||||
return $this->nextChapterId;
|
||||
}
|
||||
|
||||
public function getNavigation(): array
|
||||
{
|
||||
$navigation['previousChapter'] = $this->previousChapterId;
|
||||
$navigation['nextChapter'] = $this->nextChapterId;
|
||||
|
||||
return $navigation;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user