audit_log extends audit_log
Public SDK Event Entity.
Represents domain events emitted by the framework; use it for typing or to extend with data specific to your extension.
Tags
Table of Contents
Methods
- __construct() : mixed
- __get() : mixed
- Magic getter to allow reading protected properties.
- __isset() : bool
- Magic isset to allow checking protected properties.
- __set() : void
- Magic setter.
- create() : self
- Factory method for a new audit log entry.
- get_contextdata() : array<string, mixed>
- get_correlationid() : string|null
- get_courseid() : int|null
- get_diffs() : array<string|int, revision_diff>
- get_eventname() : string
- get_eventtype() : string
- get_extension() : string
- get_id() : int|null
- get_itemid() : int|null
- get_message() : string|null
- get_origin() : string
- get_snapshot() : snapshot_data|null
- get_subjectid() : int|null
- get_subjectkey() : string|null
- get_subjecttype() : string
- get_timecreated() : int
- get_userid() : int|null
- get_uuid() : string|null
- has_diff() : bool
- has_snapshot() : bool
- jsonSerialize() : array<string, mixed>
- Serializes the object to a value that can be natively serialized by json_encode().
- to_array() : array<string, mixed>
- with_diff() : self
- with_message() : self
- with_snapshot() : self
Methods
__construct()
public
__construct(null|int $id, null|string $uuid, string $subjecttype, null|int $subjectid, null|string $subjectkey, null|int $courseid, string $extension, string $eventname, null|int $userid[, string $origin = 'system' ][, null|string $correlationid = null ][, null|string $message = null ][, null|array<string, mixed>|string $contextdata = null ][, int $hasdiff = 0 ][, int $hassnapshot = 0 ][, int $timecreated = 0 ]) : mixed
Parameters
- $id : null|int
- $uuid : null|string
- $subjecttype : string
- $subjectid : null|int
- $subjectkey : null|string
- $courseid : null|int
- $extension : string
- $eventname : string
- $userid : null|int
- $origin : string = 'system'
- $correlationid : null|string = null
- $message : null|string = null
- $contextdata : null|array<string, mixed>|string = null
- $hasdiff : int = 0
- $hassnapshot : int = 0
- $timecreated : int = 0
__get()
Magic getter to allow reading protected properties.
public
__get(string $name) : mixed
Parameters
- $name : string
-
Property name
__isset()
Magic isset to allow checking protected properties.
public
__isset(string $name) : bool
Parameters
- $name : string
-
Property name
Return values
bool__set()
Magic setter.
public
__set(string $name, mixed $value) : void
Parameters
- $name : string
-
Property name
- $value : mixed
-
Value
create()
Factory method for a new audit log entry.
public
static 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 ]) : self
Parameters
- $extension : string
- $eventname : string
- $subjectid : int|null = null
- $userid : int|null = null
- $subjecttype : string = 'item'
- $courseid : int|null = null
- $subjectkey : string|null = null
- $correlationid : string|null = null
- $uuid : string|null = null
- $timecreated : int|null = null
Return values
selfget_contextdata()
public
get_contextdata() : array<string, mixed>
Return values
array<string, mixed>get_correlationid()
public
get_correlationid() : string|null
Return values
string|nullget_courseid()
public
get_courseid() : int|null
Return values
int|nullget_diffs()
public
get_diffs() : array<string|int, revision_diff>
Return values
array<string|int, revision_diff>get_eventname()
public
get_eventname() : string
Return values
stringget_eventtype()
public
get_eventtype() : string
Return values
stringget_extension()
public
get_extension() : string
Return values
stringget_id()
public
get_id() : int|null
Return values
int|nullget_itemid()
public
get_itemid() : int|null
Return values
int|nullget_message()
public
get_message() : string|null
Return values
string|nullget_origin()
public
get_origin() : string
Return values
stringget_snapshot()
public
get_snapshot() : snapshot_data|null
Return values
snapshot_data|nullget_subjectid()
public
get_subjectid() : int|null
Return values
int|nullget_subjectkey()
public
get_subjectkey() : string|null
Return values
string|nullget_subjecttype()
public
get_subjecttype() : string
Return values
stringget_timecreated()
public
get_timecreated() : int
Return values
intget_userid()
public
get_userid() : int|null
Return values
int|nullget_uuid()
public
get_uuid() : string|null
Return values
string|nullhas_diff()
public
has_diff() : bool
Return values
boolhas_snapshot()
public
has_snapshot() : bool
Return values
booljsonSerialize()
Serializes the object to a value that can be natively serialized by json_encode().
public
jsonSerialize() : array<string, mixed>
Tags
Return values
array<string, mixed>to_array()
public
to_array() : array<string, mixed>
Return values
array<string, mixed>with_diff()
public
with_diff(revision_diff $diff) : self
Parameters
- $diff : revision_diff
Return values
selfwith_message()
public
with_message(string $message) : self
Parameters
- $message : string
Return values
selfwith_snapshot()
public
with_snapshot(snapshot_data $snapshot) : self
Parameters
- $snapshot : snapshot_data