Book
in package
implements
JsonSerializable
Class Book
Represents a book in the library
Table of Contents
Interfaces
- JsonSerializable
Properties
- $amountOfBooks : int
- Amount Of Books
- $author : string
- Book author
- $id : int
- Book id
- $isbn : ISBN
- Book ISBN
- $section : Section
- Book section
- $title : string
- Book title
Methods
- getAmountOfBooks() : int
- Gets the Amount Of Books
- getAuthor() : string
- Gets the book author
- getId() : int
- Gets the book ID
- getIsbn() : ISBN
- Gets the book ISBN
- getSection() : Section
- Gets the book section
- getTitle() : string
- Gets the book title
- jsonSerialize() : array<string|int, mixed>
- setAmountOfBooks() : self
- Sets the Amount Of Books
- setAuthor() : self
- Sets the book author
- setId() : self
- Sets the book ID
- setIsbn() : self
- Sets the book ISBN
- setSection() : self
- Sets the book section
- setTitle() : self
- Sets the book title
Properties
$amountOfBooks
Amount Of Books
private
int
$amountOfBooks
$author
Book author
private
string
$author
$id
Book id
private
int
$id
$isbn
Book ISBN
private
ISBN
$isbn
$section
Book section
private
Section
$section
$title
Book title
private
string
$title
Methods
getAmountOfBooks()
Gets the Amount Of Books
public
getAmountOfBooks() : int
Return values
intgetAuthor()
Gets the book author
public
getAuthor() : string
Return values
stringgetId()
Gets the book ID
public
getId() : int
Return values
intgetIsbn()
Gets the book ISBN
public
getIsbn() : ISBN
Return values
ISBNgetSection()
Gets the book section
public
getSection() : Section
Return values
SectiongetTitle()
Gets the book title
public
getTitle() : string
Return values
stringjsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>setAmountOfBooks()
Sets the Amount Of Books
public
setAmountOfBooks(int $amountOfBooks) : self
Parameters
- $amountOfBooks : int
-
Amount Of Books
Return values
selfsetAuthor()
Sets the book author
public
setAuthor(string $author) : self
Parameters
- $author : string
-
Book author
Return values
selfsetId()
Sets the book ID
public
setId(int $id) : self
Parameters
- $id : int
-
Book ID
Return values
selfsetIsbn()
Sets the book ISBN
public
setIsbn(ISBN $isbn) : self
Parameters
- $isbn : ISBN
-
Book ISBN
Return values
selfsetSection()
Sets the book section
public
setSection(Section $section) : self
Parameters
- $section : Section
-
Book section
Return values
selfsetTitle()
Sets the book title
public
setTitle(string $title) : self
Parameters
- $title : string
-
Book title