MIDDAG for Moodle

job extends job

Public SDK proxy for the Job aggregate.

Tags
example

class sync_job extends \local_middag\base\domain\job { // Extension-specific helpers for job orchestration. }

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.
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

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_attempts()

public get_attempts() : int
Return values
int

get_availableat()

public get_availableat() : int
Return values
int

get_correlationid()

public get_correlationid() : string|null
Return values
string|null

get_courseid()

public get_courseid() : int|null
Return values
int|null

get_dedupkey()

public get_dedupkey() : string|null
Return values
string|null

get_extension()

public get_extension() : string
Return values
string

get_finishedat()

public get_finishedat() : int|null
Return values
int|null

get_groupkey()

public get_groupkey() : string|null
Return values
string|null

get_id()

public get_id() : int|null
Return values
int|null

get_jobtype()

public get_jobtype() : string
Return values
string

get_lastattemptat()

public get_lastattemptat() : int|null
Return values
int|null

get_lastmessage()

public get_lastmessage() : string|null
Return values
string|null

get_maxattempts()

public get_maxattempts() : int
Return values
int

get_payload()

public get_payload() : string|null
Return values
string|null

get_priority()

public get_priority() : int
Return values
int

get_runnerref()

public get_runnerref() : string|null
Return values
string|null

get_startedat()

public get_startedat() : int|null
Return values
int|null

get_status()

public get_status() : string
Return values
string

get_subjectid()

public get_subjectid() : int|null
Return values
int|null

get_subjectkey()

public get_subjectkey() : string|null
Return values
string|null

get_subjecttype()

public get_subjecttype() : string|null
Return values
string|null

get_timecreated()

public get_timecreated() : int
Return values
int

get_timemodified()

public get_timemodified() : int
Return values
int

get_transport()

public get_transport() : string
Return values
string

get_userid()

public get_userid() : int|null
Return values
int|null

get_uuid()

public get_uuid() : string|null
Return values
string|null

jsonSerialize()

Serializes the object to a value that can be natively serialized by json_encode().

public jsonSerialize() : array<string, mixed>
Tags
noinspection

PhpMethodNamingConventionInspection

Return values
array<string, mixed>

to_array()

public to_array() : array<string, mixed>
Return values
array<string, mixed>

with_status()

public with_status(string $status[, string|null $message = null ]) : self
Parameters
$status : string
$message : string|null = null
Return values
self

        
On this page

Search results