BookController
in package
Controller for book management operations.
Tags
Table of Contents
Properties
- $bookFacade : BookFacade
- Book facade.
- $viewPath : string
- View base path.
Methods
- __construct() : mixed
- Constructor.
- delete() : void
- Delete a book.
- import() : void
- Show the EPUB import form.
- index() : void
- List all books.
- show() : void
- Show a single book with chapters.
Properties
$bookFacade
Book facade.
private
BookFacade
$bookFacade
$viewPath
View base path.
private
string
$viewPath
Methods
__construct()
Constructor.
public
__construct(BookFacade $bookFacade) : mixed
Parameters
- $bookFacade : BookFacade
-
Book facade
delete()
Delete a book.
public
delete(array<string, mixed> $params) : void
Parameters
- $params : array<string, mixed>
-
Route parameters (id)
import()
Show the EPUB import form.
public
import(array<string, mixed> $params) : void
The upload itself goes to POST /api/v1/books and the outcome is rendered client-side, so this only ever serves the form.
Parameters
- $params : array<string, mixed>
-
Route parameters
index()
List all books.
public
index(array<string, mixed> $params) : void
Parameters
- $params : array<string, mixed>
-
Route parameters
show()
Show a single book with chapters.
public
show(array<string, mixed> $params) : void
Parameters
- $params : array<string, mixed>
-
Route parameters (id)