MIDDAG for Moodle

audit_log_repository_interface extends repository_interface

Contract for Event Persistence.

Table of Contents

Methods

find_by_id()  : null|audit_log_interface
Find event by ID and hydrate aggregates.
find_by_item()  : array<string|int, audit_log_interface>
Find latest events for an item.
log()  : audit_log_interface
Persist an event and its associated data (diffs/snapshots).

Methods

find_by_id()

Find event by ID and hydrate aggregates.

public find_by_id(int $id) : null|audit_log_interface
Parameters
$id : int
Tags
throws
dml_exception
Return values
null|audit_log_interface

find_by_item()

Find latest events for an item.

public find_by_item(int $itemid[, int $limit = 20 ]) : array<string|int, audit_log_interface>
Parameters
$itemid : int
$limit : int = 20
Tags
throws
dml_exception
Return values
array<string|int, audit_log_interface>

log()

Persist an event and its associated data (diffs/snapshots).

public log(audit_log_interface $event) : audit_log_interface
Parameters
$event : audit_log_interface
Tags
throws
dml_exception
Return values
audit_log_interface

The persisted event (with ID)


        
On this page

Search results