interface JobInterface

Job interface

Constants

STATUS_CREATED

STATUS_PENDING

STATUS_COMPLETED

STATUS_EXECUTED

STATUS_SUSPENDED

STATUS_ERROR

Methods

void
setDateExecuted(int|null $time)

Set execution date

void
setDateCreated(int|null $time)

Set date pushed in queue

int|null
getDateExecuted()

Get execution timestamp

int|null
getDateCreated()

Get date created timestamp

void
addError(string $errorMessage)

Add error

bool
hasSuccess()

Return true if job is executed successful

array
getErrors()

Get execution errors

string|null
getId()

Return unique job id

void
setId(string|null $id)

Set id

void
setStatus(int $status)

Set job status

int
getStatus()

Get job status

int
getPriority()

Return job priority

void
setPriority(int $priority)

Set priority

string|null
getName()

Return job name

void
setName(string|null $name)

Set name

void
execute()

Job code

string|null
getExtensionName()

Return extension name

void
setExtensionName(string|null $name)

Set extension name

void
setQueue(string|null $name)

Set executuion Queue (null for any)

string|null
getQueue()

Get queue

array
toArray()

Convert to array

Details

at line 30
void setDateExecuted(int|null $time)

Set execution date

Parameters

int|null $time timestamp

Return Value

void

at line 38
void setDateCreated(int|null $time)

Set date pushed in queue

Parameters

int|null $time timestamp

Return Value

void

at line 45
int|null getDateExecuted()

Get execution timestamp

Return Value

int|null

at line 52
int|null getDateCreated()

Get date created timestamp

Return Value

int|null

at line 60
void addError(string $errorMessage)

Add error

Parameters

string $errorMessage

Return Value

void

at line 67
bool hasSuccess()

Return true if job is executed successful

Return Value

bool

at line 74
array getErrors()

Get execution errors

Return Value

array

at line 81
string|null getId()

Return unique job id

Return Value

string|null

at line 89
void setId(string|null $id)

Set id

Parameters

string|null $id

Return Value

void

at line 97
void setStatus(int $status)

Set job status

Parameters

int $status

Return Value

void

at line 104
int getStatus()

Get job status

Return Value

int

at line 111
int getPriority()

Return job priority

Return Value

int

at line 119
void setPriority(int $priority)

Set priority

Parameters

int $priority

Return Value

void

at line 126
string|null getName()

Return job name

Return Value

string|null

at line 134
void setName(string|null $name)

Set name

Parameters

string|null $name

Return Value

void

at line 141
void execute()

Job code

Return Value

void

at line 148
string|null getExtensionName()

Return extension name

Return Value

string|null

at line 156
void setExtensionName(string|null $name)

Set extension name

Parameters

string|null $name

Return Value

void

at line 164
void setQueue(string|null $name)

Set executuion Queue (null for any)

Parameters

string|null $name

Return Value

void

at line 171
string|null getQueue()

Get queue

Return Value

string|null

at line 178
array toArray()

Convert to array

Return Value

array