Role
in package
implements
JsonSerializable
Class Role
Represents a user role in the system
Table of Contents
Interfaces
- JsonSerializable
Properties
Methods
- getId() : int
- Gets the role ID
- getName() : string
- Gets the role name
- jsonSerialize() : array<string|int, mixed>
- setId() : self
- Sets the role ID
- setName() : self
- Sets the role name
Properties
$id
Role ID
private
int
$id
$name
Role name
private
string
$name
Methods
getId()
Gets the role ID
public
getId() : int
Return values
intgetName()
Gets the role name
public
getName() : string
Return values
stringjsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>setId()
Sets the role ID
public
setId(int $id) : self
Parameters
- $id : int
-
Role ID
Return values
selfsetName()
Sets the role name
public
setName(string $name) : self
Parameters
- $name : string
-
Role name