Documentation

GetBookList

Use case for retrieving a list of books.

Tags
since
3.0.0

Table of Contents

Properties

$bookRepository  : BookRepositoryInterface

Methods

__construct()  : mixed
Constructor.
execute()  : array{books: array{id: int, title: string, author: string|null, languageId: int, sourceType: string, totalChapters: int, currentChapter: int, progress: float, createdAt: string|null, updatedAt: string|null}[], total: int, page: int, perPage: int, totalPages: int}
Get a paginated list of books.

Properties

Methods

execute()

Get a paginated list of books.

public execute([int|null $userId = null ][, int|null $languageId = null ][, int $page = 1 ][, int $perPage = 20 ]) : array{books: array{id: int, title: string, author: string|null, languageId: int, sourceType: string, totalChapters: int, currentChapter: int, progress: float, createdAt: string|null, updatedAt: string|null}[], total: int, page: int, perPage: int, totalPages: int}
Parameters
$userId : int|null = null

User ID for filtering

$languageId : int|null = null

Language ID for filtering

$page : int = 1

Page number (1-based)

$perPage : int = 20

Items per page

Return values
array{books: array{id: int, title: string, author: string|null, languageId: int, sourceType: string, totalChapters: int, currentChapter: int, progress: float, createdAt: string|null, updatedAt: string|null}[], total: int, page: int, perPage: int, totalPages: int}

        
On this page

Search results