class report_handler_post extends report_handler

Properties

protected driver_interface $db from  report_handler
protected dispatcher_interface $dispatcher from  report_handler
protected config $config from  report_handler
protected auth $auth from  report_handler
protected user $user from  report_handler
protected manager $notifications from  report_handler
protected array $report_data from  report_handler
protected array $forum_data

Methods

__construct(driver_interface $db, dispatcher_interface $dispatcher, config $config, auth $auth, user $user, manager $notification)

Constructor

int
create_report(array $report_data)

Creates a report entity in the database

null
add_report(int $id, int $reason_id, string $report_text, int $user_notify)

Reports a message

null
validate_report_request(int $id)

Checks if the message is reportable

Details

in report_handler at line 63
__construct(driver_interface $db, dispatcher_interface $dispatcher, config $config, auth $auth, user $user, manager $notification)

Constructor

Parameters

driver_interface $db
dispatcher_interface $dispatcher
config $config
auth $auth
user $user
manager $notification

in report_handler at line 80
protected int create_report(array $report_data)

Creates a report entity in the database

Parameters

array $report_data

Return Value

int

the ID of the created entity

at line 33
null add_report(int $id, int $reason_id, string $report_text, int $user_notify)

Reports a message

Parameters

int $id
int $reason_id
string $report_text
int $user_notify

Return Value

null

Exceptions

empty_report_exception
already_reported_exception
entity_not_found_exception
invalid_report_exception

at line 94
null validate_report_request(int $id)

Checks if the message is reportable

Parameters

int $id

Return Value

null

Exceptions

already_reported_exception
entity_not_found_exception
invalid_report_exception