job extends abstract_entity implements job_interface
Aggregate root for async command governance.
Table of Contents
Interfaces
- job_interface
- Public contract for the persisted async governance record.
Properties
- $attempt_log : array<string|int, mixed>
- $attempts : int
- $availableat : int
- $correlationid : string|null
- $courseid : int|null
- $dedupkey : string|null
- $extension : string
- $finishedat : int|null
- $groupkey : string|null
- $id : int|null
- $jobtype : string
- $lastattemptat : int|null
- $lastmessage : string|null
- $maxattempts : int
- $payload : string|null
- $priority : int
- $runnerref : string|null
- $startedat : int|null
- $status : string
- $subjectid : int|null
- $subjectkey : string|null
- $subjecttype : string|null
- $timecreated : int
- $timemodified : int
- $transport : string
- $userid : int|null
- $uuid : string|null
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.
- get_attempt_log() : array<string|int, job_attempt_interface>
- get_attempts() : int
- get_availableat() : int
- get_correlationid() : string|null
- get_courseid() : int|null
- get_dedupkey() : string|null
- get_extension() : string
- get_finishedat() : int|null
- get_groupkey() : string|null
- get_id() : int|null
- get_jobtype() : string
- get_lastattemptat() : int|null
- get_lastmessage() : string|null
- get_maxattempts() : int
- get_payload() : string|null
- get_priority() : int
- get_runnerref() : string|null
- get_startedat() : int|null
- get_status() : string
- get_subjectid() : int|null
- get_subjectkey() : string|null
- get_subjecttype() : string|null
- get_timecreated() : int
- get_timemodified() : int
- get_transport() : string
- get_userid() : int|null
- get_uuid() : string|null
- jsonSerialize() : array<string, mixed>
- Serializes the object to a value that can be natively serialized by json_encode().
- to_array() : array<string, mixed>
- with_attempt() : self
- with_status() : self
Properties
$attempt_log
private
array<string|int, mixed>
$attempt_log
= []
$attempts
private
int
$attempts
= 0
$availableat
private
int
$availableat
= 0
$correlationid
private
string|null
$correlationid
= null
$courseid
private
int|null
$courseid
= null
$dedupkey
private
string|null
$dedupkey
= null
$extension
private
string
$extension
= 'system'
$finishedat
private
int|null
$finishedat
= null
$groupkey
private
string|null
$groupkey
= null
$id
private
int|null
$id
= null
$jobtype
private
string
$jobtype
= 'generic'
$lastattemptat
private
int|null
$lastattemptat
= null
$lastmessage
private
string|null
$lastmessage
= null
$maxattempts
private
int
$maxattempts
= 3
$payload
private
string|null
$payload
= null
$priority
private
int
$priority
= 50
$runnerref
private
string|null
$runnerref
= null
$startedat
private
int|null
$startedat
= null
$status
private
string
$status
= 'pending'
$subjectid
private
int|null
$subjectid
= null
$subjectkey
private
string|null
$subjectkey
= null
$subjecttype
private
string|null
$subjecttype
= null
$timecreated
private
int
$timecreated
= 0
$timemodified
private
int
$timemodified
= 0
$transport
private
string
$transport
= 'moodle_adhoc'
$userid
private
int|null
$userid
= null
$uuid
private
string|null
$uuid
= null
Methods
__construct()
public
__construct([int|null $id = null ][, string|null $uuid = null ][, string $extension = 'system' ][, string $jobtype = 'generic' ][, string $transport = 'moodle_adhoc' ][, string $status = 'pending' ][, int $priority = 50 ][, string|null $dedupkey = null ][, string|null $groupkey = null ][, string|null $correlationid = null ][, string|null $subjecttype = null ][, int|null $subjectid = null ][, string|null $subjectkey = null ][, int|null $courseid = null ][, int|null $userid = null ][, string|null $payload = null ][, string|null $runnerref = null ][, int $attempts = 0 ][, int $maxattempts = 3 ][, int $availableat = 0 ][, int|null $startedat = null ][, int|null $finishedat = null ][, int|null $lastattemptat = null ][, string|null $lastmessage = null ][, int $timecreated = 0 ][, int $timemodified = 0 ][, array<string|int, job_attempt_interface> $attempt_log = [] ]) : mixed
Parameters
- $id : int|null = null
- $uuid : string|null = null
- $extension : string = 'system'
- $jobtype : string = 'generic'
- $transport : string = 'moodle_adhoc'
- $status : string = 'pending'
- $priority : int = 50
- $dedupkey : string|null = null
- $groupkey : string|null = null
- $correlationid : string|null = null
- $subjecttype : string|null = null
- $subjectid : int|null = null
- $subjectkey : string|null = null
- $courseid : int|null = null
- $userid : int|null = null
- $payload : string|null = null
- $runnerref : string|null = null
- $attempts : int = 0
- $maxattempts : int = 3
- $availableat : int = 0
- $startedat : int|null = null
- $finishedat : int|null = null
- $lastattemptat : int|null = null
- $lastmessage : string|null = null
- $timecreated : int = 0
- $timemodified : int = 0
- $attempt_log : array<string|int, job_attempt_interface> = []
__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
get_attempt_log()
public
get_attempt_log() : array<string|int, job_attempt_interface>
Return values
array<string|int, job_attempt_interface>get_attempts()
public
get_attempts() : int
Return values
intget_availableat()
public
get_availableat() : int
Return values
intget_correlationid()
public
get_correlationid() : string|null
Return values
string|nullget_courseid()
public
get_courseid() : int|null
Return values
int|nullget_dedupkey()
public
get_dedupkey() : string|null
Return values
string|nullget_extension()
public
get_extension() : string
Return values
stringget_finishedat()
public
get_finishedat() : int|null
Return values
int|nullget_groupkey()
public
get_groupkey() : string|null
Return values
string|nullget_id()
public
get_id() : int|null
Return values
int|nullget_jobtype()
public
get_jobtype() : string
Return values
stringget_lastattemptat()
public
get_lastattemptat() : int|null
Return values
int|nullget_lastmessage()
public
get_lastmessage() : string|null
Return values
string|nullget_maxattempts()
public
get_maxattempts() : int
Return values
intget_payload()
public
get_payload() : string|null
Return values
string|nullget_priority()
public
get_priority() : int
Return values
intget_runnerref()
public
get_runnerref() : string|null
Return values
string|nullget_startedat()
public
get_startedat() : int|null
Return values
int|nullget_status()
public
get_status() : string
Return values
stringget_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|null
Return values
string|nullget_timecreated()
public
get_timecreated() : int
Return values
intget_timemodified()
public
get_timemodified() : int
Return values
intget_transport()
public
get_transport() : string
Return values
stringget_userid()
public
get_userid() : int|null
Return values
int|nullget_uuid()
public
get_uuid() : string|null
Return values
string|nulljsonSerialize()
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_attempt()
public
with_attempt(job_attempt_interface $attempt) : self
Parameters
- $attempt : job_attempt_interface
Return values
selfwith_status()
public
with_status(string $status[, string|null $message = null ]) : self
Parameters
- $status : string
- $message : string|null = null