Report
in package
Report Class
Tags
Table of Contents
- $_current_user_id : int
- $_reports : array<string|int, mixed>
- __construct() : void
- Constructor
- getAllDestroyedReports() : array<string|int, mixed>
- Get all the reports provided by the query result, that are destroyed
- getAllReports() : array<string|int, mixed>
- Get all the reports provided by the query result
- getAllReportsOwnedByUserId() : array<string|int, mixed>
- Get all the reports provided by the query result, filtered by current user
- getFirstReportOwnersAsArray() : array<string|int, mixed>
- Get first report owners as an array
- getReportOwnersAsArrayByReportId() : ReportEntity
- createNewReportEntity() : ReportEntity
- Create a new instance of ReportEntity
- getReportOwnersAsArray() : array<string|int, mixed>
- Get report owners as an array
- getUserId() : int
- isDestroyedReport() : bool
- Check if a report is destroyed
- isOwnRequest() : bool
- Check if is the report owner
- setUp() : void
- Set up the list of reports
- setUserId() : mixed
Properties
$_current_user_id
private
int
$_current_user_id
= 0
$_reports
private
array<string|int, mixed>
$_reports
= []
Methods
__construct()
Constructor
public
__construct(array<string|int, mixed> $reports, int $current_user_id) : void
Parameters
- $reports : array<string|int, mixed>
-
Reports
- $current_user_id : int
-
Current User ID
Return values
void —getAllDestroyedReports()
Get all the reports provided by the query result, that are destroyed
public
getAllDestroyedReports() : array<string|int, mixed>
Return values
array<string|int, mixed> —getAllReports()
Get all the reports provided by the query result
public
getAllReports() : array<string|int, mixed>
Return values
array<string|int, mixed> —getAllReportsOwnedByUserId()
Get all the reports provided by the query result, filtered by current user
public
getAllReportsOwnedByUserId() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFirstReportOwnersAsArray()
Get first report owners as an array
public
getFirstReportOwnersAsArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —getReportOwnersAsArrayByReportId()
public
getReportOwnersAsArrayByReportId(type $report_id) : ReportEntity
Parameters
- $report_id : type
Return values
ReportEntity —createNewReportEntity()
Create a new instance of ReportEntity
private
createNewReportEntity(array<string|int, mixed> $report) : ReportEntity
Parameters
- $report : array<string|int, mixed>
-
Report
Return values
ReportEntity —getReportOwnersAsArray()
Get report owners as an array
private
getReportOwnersAsArray(ReportEntity $report) : array<string|int, mixed>
Parameters
- $report : ReportEntity
Return values
array<string|int, mixed> —getUserId()
private
getUserId() : int
Return values
int —isDestroyedReport()
Check if a report is destroyed
private
isDestroyedReport(ReportEntity $report) : bool
Parameters
- $report : ReportEntity
-
Report
Return values
bool —isOwnRequest()
Check if is the report owner
private
isOwnRequest(ReportEntity $report) : bool
Parameters
- $report : ReportEntity
-
Report
Return values
bool —setUp()
Set up the list of reports
private
setUp(array<string|int, mixed> $reports) : void
Parameters
- $reports : array<string|int, mixed>
-
Reports
Return values
void —setUserId()
private
setUserId(int $user_id) : mixed
Parameters
- $user_id : int
-
User Id