Arikaim CMS

JobInterface

Job interface

Table of Contents

Constants

STATUS_COMPLETED  = 2
STATUS_CREATED  = 0
STATUS_ERROR  = 10
STATUS_EXECUTED  = 3
STATUS_PENDING  = 1
STATUS_SUSPENDED  = 5

Methods

addError()  : void
Add error
descriptor()  : object|null
Get properties descriptor
execute()  : void
Job code
getDateCreated()  : int
Get date created timestamp
getDateExecuted()  : int
Get execution timestamp
getErrors()  : array<string|int, mixed>
Get execution errors
getExtensionName()  : string|null
Return extension name
getId()  : string|null
Return unique job id
getName()  : string|null
Return job name
getParams()  : array<string|int, mixed>
Get hjob params
getPriority()  : int
Return job priority
getQueue()  : string|null
Get queue
getStatus()  : int
Get job status
hasSuccess()  : bool
Return true if job is executed successful
setDateCreated()  : void
Set date pushed in queue
setDateExecuted()  : void
Set execution date
setExtensionName()  : void
Set extension name
setId()  : void
Set id
setName()  : void
Set name
setParams()  : void
Set job params
setPriority()  : void
Set priority
setQueue()  : void
Set executuion Queue (null for any)
setStatus()  : void
Set job status
toArray()  : array<string|int, mixed>
Convert to array

Constants

Methods

addError()

Add error

public addError(string $errorMessage) : void
Parameters
$errorMessage : string

descriptor()

Get properties descriptor

public descriptor() : object|null
Return values
object|null

getDateCreated()

Get date created timestamp

public getDateCreated() : int
Return values
int

getDateExecuted()

Get execution timestamp

public getDateExecuted() : int
Return values
int

getErrors()

Get execution errors

public getErrors() : array<string|int, mixed>
Return values
array<string|int, mixed>

getExtensionName()

Return extension name

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

getId()

Return unique job id

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

getName()

Return job name

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

getParams()

Get hjob params

public getParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPriority()

Return job priority

public getPriority() : int
Return values
int

getQueue()

Get queue

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

getStatus()

Get job status

public getStatus() : int
Return values
int

hasSuccess()

Return true if job is executed successful

public hasSuccess() : bool
Return values
bool

setDateCreated()

Set date pushed in queue

public setDateCreated(int|null $time) : void
Parameters
$time : int|null

timestamp

setDateExecuted()

Set execution date

public setDateExecuted(int|null $time) : void
Parameters
$time : int|null

timestamp

setExtensionName()

Set extension name

public setExtensionName(string|null $name) : void
Parameters
$name : string|null

setId()

Set id

public setId(string|null $id) : void
Parameters
$id : string|null

setName()

Set name

public setName(string|null $name) : void
Parameters
$name : string|null

setParams()

Set job params

public setParams(array<string|int, mixed> $params) : void
Parameters
$params : array<string|int, mixed>

setPriority()

Set priority

public setPriority(int $priority) : void
Parameters
$priority : int

setQueue()

Set executuion Queue (null for any)

public setQueue(string|null $name) : void
Parameters
$name : string|null

setStatus()

Set job status

public setStatus(int $status) : void
Parameters
$status : int

toArray()

Convert to array

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results