job_attempt extends abstract_entity implements job_attempt_interface
Satellite entity representing one execution attempt of a job.
Table of Contents
Interfaces
- job_attempt_interface
- Contract for one execution attempt persisted in `middag_job_attempt`.
Properties
- $attemptnumber : int
- $errormessage : string|null
- $errortype : string|null
- $finishedat : int|null
- $id : int|null
- $jobid : int|null
- $resultdata : string|null
- $runnerref : string|null
- $startedat : int|null
- $status : string
- $timecreated : int
- $transport : string
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_attemptnumber() : int
- get_errormessage() : string|null
- get_errortype() : string|null
- get_finishedat() : int|null
- get_id() : int|null
- get_jobid() : int|null
- get_resultdata() : string|null
- get_runnerref() : string|null
- get_startedat() : int|null
- get_status() : string
- get_timecreated() : int
- get_transport() : string
- jsonSerialize() : array<string, mixed>
- Serializes the object to a value that can be natively serialized by json_encode().
- to_array() : array<string, mixed>
Properties
$attemptnumber read-only
private
int
$attemptnumber
= 1
$errormessage read-only
private
string|null
$errormessage
= null
$errortype read-only
private
string|null
$errortype
= null
$finishedat read-only
private
int|null
$finishedat
= null
$id read-only
private
int|null
$id
= null
$jobid read-only
private
int|null
$jobid
= null
$resultdata read-only
private
string|null
$resultdata
= null
$runnerref read-only
private
string|null
$runnerref
= null
$startedat read-only
private
int|null
$startedat
= null
$status read-only
private
string
$status
= 'pending'
$timecreated
private
int
$timecreated
= 0
$transport read-only
private
string
$transport
= 'moodle_adhoc'
Methods
__construct()
public
__construct([int|null $id = null ][, int|null $jobid = null ][, int $attemptnumber = 1 ][, string $transport = 'moodle_adhoc' ][, string|null $runnerref = null ][, string $status = 'pending' ][, int|null $startedat = null ][, int|null $finishedat = null ][, string|null $errortype = null ][, string|null $errormessage = null ][, string|null $resultdata = null ][, int $timecreated = 0 ]) : mixed
Parameters
- $id : int|null = null
- $jobid : int|null = null
- $attemptnumber : int = 1
- $transport : string = 'moodle_adhoc'
- $runnerref : string|null = null
- $status : string = 'pending'
- $startedat : int|null = null
- $finishedat : int|null = null
- $errortype : string|null = null
- $errormessage : string|null = null
- $resultdata : string|null = null
- $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
get_attemptnumber()
public
get_attemptnumber() : int
Return values
intget_errormessage()
public
get_errormessage() : string|null
Return values
string|nullget_errortype()
public
get_errortype() : string|null
Return values
string|nullget_finishedat()
public
get_finishedat() : int|null
Return values
int|nullget_id()
public
get_id() : int|null
Return values
int|nullget_jobid()
public
get_jobid() : int|null
Return values
int|nullget_resultdata()
public
get_resultdata() : string|null
Return values
string|nullget_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_timecreated()
public
get_timecreated() : int
Return values
intget_transport()
public
get_transport() : string
Return values
stringjsonSerialize()
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>