User
in package
AbstractYes
Class User
Represents a user in the system.
Table of Contents
Properties
- $email : string
- User email
- $id : int
- User ID
- $loanAmount : int
- Number of loans the user can make
- $name : string
- Username
- $registration : string
- User registration
- $role : Role
- User role
Methods
- canTakeOutMoreLoans() : bool
- Checks if the user can make more loans
- getEmail() : string
- Gets the user email
- getId() : int
- Gets the user ID
- getLoanAmount() : int
- Gets the number of loans the user can make
- getName() : string
- Gets the username
- getRegistration() : string
- Gets the user registration
- getRole() : Role
- Gets the user role
- setEmail() : self
- Sets the user email
- setId() : self
- Sets the user ID
- setLoanAmount() : self
- Sets the number of loans the user can make
- setName() : self
- Sets the username
- setRegistration() : self
- Sets the user registration
- setRole() : self
- Sets the user role
Properties
User email
private
string
$email
$id
User ID
private
int
$id
$loanAmount
Number of loans the user can make
private
int
$loanAmount
$name
Username
private
string
$name
$registration
User registration
private
string
$registration
$role
User role
private
Role
$role
Methods
canTakeOutMoreLoans()
Checks if the user can make more loans
public
abstract canTakeOutMoreLoans(int $amountCurrentLoans) : bool
Parameters
- $amountCurrentLoans : int
-
Current number of loans
Return values
bool —Returns true if the user can make more loans.
getEmail()
Gets the user email
public
getEmail() : string
Return values
stringgetId()
Gets the user ID
public
getId() : int
Return values
intgetLoanAmount()
Gets the number of loans the user can make
public
getLoanAmount() : int
Return values
intgetName()
Gets the username
public
getName() : string
Return values
stringgetRegistration()
Gets the user registration
public
getRegistration() : string
Return values
stringgetRole()
Gets the user role
public
getRole() : Role
Return values
RolesetEmail()
Sets the user email
public
setEmail(string $email) : self
Parameters
- $email : string
-
User email
Return values
selfsetId()
Sets the user ID
public
setId(int $id) : self
Parameters
- $id : int
-
User ID
Return values
selfsetLoanAmount()
Sets the number of loans the user can make
public
setLoanAmount(int $loanAmount) : self
Parameters
- $loanAmount : int
-
Number of loans
Return values
selfsetName()
Sets the username
public
setName(string $name) : self
Parameters
- $name : string
-
Username
Return values
selfsetRegistration()
Sets the user registration
public
setRegistration(string $registration) : self
Parameters
- $registration : string
-
User registration
Return values
selfsetRole()
Sets the user role
public
setRole(Role $role) : self
Parameters
- $role : Role
-
User role