audit_log
class audit_log extends abstract_entity implements audit_log_interface
Domain Entity: Audit Log.
Represents a persistent audit record in middag_audit_log.
Methods
Serializes the object to a value that can be natively serialized by json_encode().
No description
Factory method for a new audit log entry.
No description
Get the full data snapshot if available.
No description
Get the entity unique identifier.
Stable identifier for the audit record.
Audited subject type.
Audited subject identifier.
Audited subject natural key.
Related course identifier.
The ID of the item affected by the event.
Get the extension slug that emitted the event.
Get the canonical event name identifier.
Get the event type identifier.
Get the user ID responsible for the event.
Get the origin source (e.g., web, api).
Get the optional human-readable message.
Trace correlation identifier.
No description
Does this event contain field differences?
Does this event contain a full item snapshot?
Get the creation timestamp of the event.
No description
Details
in
abstract_entity at line 39
mixed
__get(string $name)
Magic getter to allow reading protected properties.
in
abstract_entity at line 55
bool
__isset(string $name)
Magic isset to allow checking protected properties.
in
abstract_entity at line 66
void
__set(string $name, mixed $value)
Magic setter.
in
abstract_entity at line 80
array
jsonSerialize()
Serializes the object to a value that can be natively serialized by json_encode().
at line 58
__construct(int|null $id, string|null $uuid, string $subjecttype, int|null $subjectid, string|null $subjectkey, int|null $courseid, string $extension, string $eventname, int|null $userid, string $origin = 'system', string|null $correlationid = null, string|null $message = null, array|string|null $contextdata = null, int $hasdiff = 0, int $hassnapshot = 0, int $timecreated = 0)
No description
at line 86
static audit_log
create(string $extension, string $eventname, int|null $subjectid = null, int|null $userid = null, string $subjecttype = 'item', int|null $courseid = null, string|null $subjectkey = null, string|null $correlationid = null, string|null $uuid = null, int|null $timecreated = null)
Factory method for a new audit log entry.
at line 121
array
get_diffs()
No description
at line 126
snapshot_data|null
get_snapshot()
Get the full data snapshot if available.
at line 131
audit_log
with_diff(revision_diff $diff)
No description
at line 144
audit_log
with_snapshot(snapshot_data $snapshot)
No description
at line 153
audit_log
with_message(string $message)
No description
at line 161
int|null
get_id()
Get the entity unique identifier.
Returns null if the entity has not been persisted yet.
at line 166
string|null
get_uuid()
Stable identifier for the audit record.
at line 171
string
get_subjecttype()
Audited subject type.
at line 176
int|null
get_subjectid()
Audited subject identifier.
at line 181
string|null
get_subjectkey()
Audited subject natural key.
at line 186
int|null
get_courseid()
Related course identifier.
at line 191
int|null
get_itemid()
The ID of the item affected by the event.
at line 196
string
get_extension()
Get the extension slug that emitted the event.
at line 201
string
get_eventname()
Get the canonical event name identifier.
at line 206
string
get_eventtype()
Get the event type identifier.
at line 211
int|null
get_userid()
Get the user ID responsible for the event.
at line 216
string
get_origin()
Get the origin source (e.g., web, api).
at line 221
string|null
get_message()
Get the optional human-readable message.
at line 226
string|null
get_correlationid()
Trace correlation identifier.
at line 234
array
get_contextdata()
No description
at line 239
bool
has_diff()
Does this event contain field differences?
at line 244
bool
has_snapshot()
Does this event contain a full item snapshot?
at line 249
int
get_timecreated()
Get the creation timestamp of the event.
at line 257
array
to_array()
No description