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 this audit record.
Get the extension slug that emitted the audited fact.
Get the canonical audited event name identifier.
Compatibility alias for event type identifier.
Get the user ID responsible for the audited fact.
Get the origin source (e.g., web, api).
Get the optional human-readable message.
Trace correlation identifier.
No description
Does this audit record contain field differences?
Does this audit record contain a full item snapshot?
Get the creation timestamp of the audit record.
No description
Details
in
abstract_entity at line 37
mixed
__get(string $name)
Magic getter to allow reading protected properties.
in
abstract_entity at line 53
bool
__isset(string $name)
Magic isset to allow checking protected properties.
in
abstract_entity at line 64
void
__set(string $name, mixed $value)
Magic setter.
in
abstract_entity at line 78
array
jsonSerialize()
Serializes the object to a value that can be natively serialized by json_encode().
at line 56
__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 84
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 119
array
get_diffs()
No description
at line 124
audit_snapshot_interface|null
get_snapshot()
Get the full data snapshot if available.
at line 129
audit_log
with_diff(audit_diff_interface $diff)
No description
at line 152
audit_log
with_snapshot(audit_snapshot_interface $snapshot)
No description
at line 161
audit_log
with_message(string $message)
No description
at line 169
int|null
get_id()
Get the entity unique identifier.
Returns null if the entity has not been persisted yet.
at line 174
string|null
get_uuid()
Stable identifier for the audit record.
at line 179
string
get_subjecttype()
Audited subject type.
at line 184
int|null
get_subjectid()
Audited subject identifier.
at line 189
string|null
get_subjectkey()
Audited subject natural key.
at line 194
int|null
get_courseid()
Related course identifier.
at line 199
int|null
get_itemid()
The ID of the item affected by this audit record.
at line 204
string
get_extension()
Get the extension slug that emitted the audited fact.
at line 209
string
get_eventname()
Get the canonical audited event name identifier.
at line 214
string
get_eventtype()
Compatibility alias for event type identifier.
at line 219
int|null
get_userid()
Get the user ID responsible for the audited fact.
at line 224
string
get_origin()
Get the origin source (e.g., web, api).
at line 229
string|null
get_message()
Get the optional human-readable message.
at line 234
string|null
get_correlationid()
Trace correlation identifier.
at line 242
array
get_contextdata()
No description
at line 247
bool
has_diff()
Does this audit record contain field differences?
at line 252
bool
has_snapshot()
Does this audit record contain a full item snapshot?
at line 257
int
get_timecreated()
Get the creation timestamp of the audit record.
at line 265
array
to_array()
No description