LoanController
in package
Class LoanController
Handles HTTP requests related to loans.
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor for the LoanController class.
- create() : void
- Handles the creation of a new loan.
- delete() : void
- Handles the deletion of a loan by its ID.
- getAll() : void
- Handles the retrieval of all loans.
- getById() : void
- Handles the retrieval of a loan by its ID.
- update() : void
- Handles the update of an existing loan.
Properties
$loanService
private
LoanService
$loanService
Methods
__construct()
Constructor for the LoanController class.
public
__construct(LoanService $loanService) : mixed
Initializes the loan service.
Parameters
- $loanService : LoanService
-
The service for managing loans.
create()
Handles the creation of a new loan.
public
create(object $data) : void
Parameters
- $data : object
-
The data for creating the loan.
Tags
delete()
Handles the deletion of a loan by its ID.
public
delete(int $idLoan) : void
Parameters
- $idLoan : int
-
The ID of the loan to delete.
getAll()
Handles the retrieval of all loans.
public
getAll() : void
getById()
Handles the retrieval of a loan by its ID.
public
getById(int $idLoan) : void
Parameters
- $idLoan : int
-
The ID of the loan to retrieve.
Tags
update()
Handles the update of an existing loan.
public
update(int $id, object $data) : void
Parameters
- $id : int
-
The ID of the loan to be updated.
- $data : object
-
The data for updating the loan.