feat: Reader beginning

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2025-02-16 16:15:42 +01:00
parent e90c0a140e
commit 55945adc53
37 changed files with 1057 additions and 47 deletions

View File

@@ -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;
}
}