class CopyService (View source)

Service class to handle operations related to book copies.

Methods

void
storeCopies(string $binaryBookId, int $quantity)

Registers multiple copies of a book in the database.

Details

void storeCopies(string $binaryBookId, int $quantity)

Registers multiple copies of a book in the database.

Ensures that the number of copies does not exceed the maximum allowed (32767) and inserts them in chunks to optimize database performance.

Parameters

string $binaryBookId

The book ID in binary format

int $quantity

Number of copies to create

Return Value

void

Exceptions

InvalidArgumentException
Exception