interface audit_log_repository_interface implements repository_interface

Contract for audit log persistence.

Methods

log(audit_log_interface $event)

Persist an audit log and its associated data (diffs/snapshot).

audit_log_interface|null
find_by_id(int $id)

Find audit log by ID and hydrate child aggregates.

array
find_by_item(int $itemid, int $limit = 20)

Find latest audit logs for an item.

Details

at line 39
audit_log_interface log(audit_log_interface $event)

Persist an audit log and its associated data (diffs/snapshot).

Parameters

audit_log_interface $event

Return Value

audit_log_interface

The persisted audit log (with ID)

Exceptions

dml_exception

at line 50
audit_log_interface|null find_by_id(int $id)

Find audit log by ID and hydrate child aggregates.

Parameters

int $id

Return Value

audit_log_interface|null

Exceptions

dml_exception

at line 62
array find_by_item(int $itemid, int $limit = 20)

Find latest audit logs for an item.

Parameters

int $itemid
int $limit

Return Value

array

Exceptions

dml_exception