PHP Class Cronario\AbstractJob

Inheritance: implements Serializable, use trait Cronario\TraitOptions
Datei anzeigen Open project: cronario/cronario Class Usage Examples

Protected Properties

Property Type Description
$callbacks array
$data array
$result Cronario\Exception\ResultException
$resultClass
$workerClass null | string

Public Methods

Method Description
__clone ( )
__construct ( array $options = [] )
__invoke ( AbstractJob $parentJob = null ) : ResultException | null
addAttempts ( integer $inc = 1 ) : AbstractJob
addData ( $key, $value )
addDebug ( $value )
countAttemptQueueDelay ( ) : integer
getAppId ( ) : array | integer | null | string
getAttemptDelay ( ) : integer
getAttemptStrategy ( ) : integer | null | string
getAttempts ( ) : integer
getAttemptsMax ( ) : integer | null | string
getAuthor ( ) : mixed
getCallbacks ( ) : array
getCallbacksByType ( $type ) : array
getCallbacksDone ( ) : mixed
getCallbacksError ( ) : mixed
getCallbacksFailure ( ) : mixed
getCallbacksSuccess ( ) : mixed
getComment ( ) : integer | null | string
getCreateOn ( ) : integer | null | string
getData ( null $key = null, null $default = null ) : string | integer | null
getDebug ( ) : null | array
getDeleteOn ( ) : integer | null | string
getExpiredOn ( ) : null
getFinishOn ( ) : null
getId ( ) : mixed
getJobClass ( ) : string
getParam ( null $key = null, null $default = null ) : string | integer | null
getPriority ( ) : null
getQueueDelay ( ) : mixed
getResult ( ) : ResultException | null
getSchedule ( ) : integer | null | string
getScheduleDelay ( ) : integer
getStartOn ( ) : mixed
getWorkerClass ( ) : string
hasAttempt ( ) : boolean
hasData ( $key ) : boolean
hasParam ( $key ) : boolean
isDebug ( ) : integer | null | string
isStored ( ) : boolean
isSync ( ) : boolean
putIntoQueue ( )
save ( )
serialize ( ) : string
setAppId ( $appId ) : AbstractJob
setAttemptDelay ( $attemptDelay ) : AbstractJob
setAttemptStrategy ( $attemptStrategy ) : AbstractJob
setAttempts ( $value ) : AbstractJob
setAttemptsMax ( $attemptMax ) : AbstractJob
setAuthor ( $author )
setCallbackDone ( $job ) : AbstractJob
setCallbackError ( $job ) : AbstractJob
setCallbackFailure ( $job ) : AbstractJob
setCallbackSuccess ( $job ) : AbstractJob
setCallbacks ( array $callbacks = [] )
setComment ( $comment ) : AbstractJob
setCreateOn ( $value ) : AbstractJob
setData ( $key, $value )
setDebug ( $debug ) : AbstractJob
setDeleteOn ( $value ) : AbstractJob
setExpiredOn ( $value ) : AbstractJob
setId ( $id ) : AbstractJob
setParam ( $key, $value )
setParams ( array $params = [] )
setPriority ( $priority ) : AbstractJob
setResult ( $result, null $data = null ) : ResultException | mixed
setSchedule ( $schedule ) : AbstractJob
setStartOn ( $value ) : AbstractJob
setSync ( $bool ) : AbstractJob
setWorkerClass ( $class ) : AbstractJob
unserialize ( string $serialized )
unsetData ( $key )

Protected Methods

Method Description
addCallbackJob ( $type, $job )
addDefaultData ( )
getParentId ( ) : integer | null | string
getProducer ( ) region Storage Queue ***********************************************************
getQueue ( ) : Queue
getStorage ( ) : Cronario\Storage\StorageInterface
init ( ) Template Method
setJobClass ( $class ) : AbstractJob
setParentId ( $parentId ) : AbstractJob

Method Details

__clone() public method

public __clone ( )

__construct() public method

public __construct ( array $options = [] )
$options array

__invoke() public method

public __invoke ( AbstractJob $parentJob = null ) : ResultException | null
$parentJob AbstractJob
return Cronario\Exception\ResultException | null

addAttempts() public method

public addAttempts ( integer $inc = 1 ) : AbstractJob
$inc integer
return AbstractJob

addCallbackJob() protected method

protected addCallbackJob ( $type, $job )
$type
$job

addData() public method

public addData ( $key, $value )
$key
$value

addDebug() public method

public addDebug ( $value )
$value

addDefaultData() protected method

protected addDefaultData ( )

countAttemptQueueDelay() public method

public countAttemptQueueDelay ( ) : integer
return integer

getAppId() public method

public getAppId ( ) : array | integer | null | string
return array | integer | null | string

getAttemptDelay() public method

public getAttemptDelay ( ) : integer
return integer

getAttemptStrategy() public method

public getAttemptStrategy ( ) : integer | null | string
return integer | null | string

getAttempts() public method

public getAttempts ( ) : integer
return integer

getAttemptsMax() public method

public getAttemptsMax ( ) : integer | null | string
return integer | null | string

getAuthor() public method

public getAuthor ( ) : mixed
return mixed

getCallbacks() public method

public getCallbacks ( ) : array
return array

getCallbacksByType() public method

public getCallbacksByType ( $type ) : array
$type
return array

getCallbacksDone() public method

public getCallbacksDone ( ) : mixed
return mixed

getCallbacksError() public method

public getCallbacksError ( ) : mixed
return mixed

getCallbacksFailure() public method

public getCallbacksFailure ( ) : mixed
return mixed

getCallbacksSuccess() public method

public getCallbacksSuccess ( ) : mixed
return mixed

getComment() public method

public getComment ( ) : integer | null | string
return integer | null | string

getCreateOn() public method

public getCreateOn ( ) : integer | null | string
return integer | null | string

getData() public method

public getData ( null $key = null, null $default = null ) : string | integer | null
$key null
$default null
return string | integer | null

getDebug() public method

public getDebug ( ) : null | array
return null | array

getDeleteOn() public method

public getDeleteOn ( ) : integer | null | string
return integer | null | string

getExpiredOn() public method

public getExpiredOn ( ) : null
return null

getFinishOn() public method

public getFinishOn ( ) : null
return null

getId() public method

public getId ( ) : mixed
return mixed

getJobClass() public method

public getJobClass ( ) : string
return string

getParam() public method

public getParam ( null $key = null, null $default = null ) : string | integer | null
$key null
$default null
return string | integer | null

getParentId() protected method

protected getParentId ( ) : integer | null | string
return integer | null | string

getPriority() public method

public getPriority ( ) : null
return null

getProducer() protected method

region Storage Queue ***********************************************************
protected getProducer ( )

getQueue() protected method

protected getQueue ( ) : Queue
return Queue

getQueueDelay() public method

public getQueueDelay ( ) : mixed
return mixed

getResult() public method

public getResult ( ) : ResultException | null
return Cronario\Exception\ResultException | null

getSchedule() public method

public getSchedule ( ) : integer | null | string
return integer | null | string

getScheduleDelay() public method

public getScheduleDelay ( ) : integer
return integer return -1 : if schedule is not set return x >= 0 : if schedule is set

getStartOn() public method

public getStartOn ( ) : mixed
return mixed

getStorage() protected method

protected getStorage ( ) : Cronario\Storage\StorageInterface
return Cronario\Storage\StorageInterface

getWorkerClass() public method

public getWorkerClass ( ) : string
return string

hasAttempt() public method

public hasAttempt ( ) : boolean
return boolean

hasData() public method

public hasData ( $key ) : boolean
$key
return boolean

hasParam() public method

public hasParam ( $key ) : boolean
$key
return boolean

init() protected method

Template Method
protected init ( )

isDebug() public method

public isDebug ( ) : integer | null | string
return integer | null | string

isStored() public method

public isStored ( ) : boolean
return boolean

isSync() public method

public isSync ( ) : boolean
return boolean

putIntoQueue() public method

public putIntoQueue ( )

save() public method

public save ( )

serialize() public method

public serialize ( ) : string
return string

setAppId() public method

public setAppId ( $appId ) : AbstractJob
$appId
return AbstractJob

setAttemptDelay() public method

public setAttemptDelay ( $attemptDelay ) : AbstractJob
$attemptDelay
return AbstractJob

setAttemptStrategy() public method

public setAttemptStrategy ( $attemptStrategy ) : AbstractJob
$attemptStrategy
return AbstractJob

setAttempts() public method

public setAttempts ( $value ) : AbstractJob
$value
return AbstractJob

setAttemptsMax() public method

public setAttemptsMax ( $attemptMax ) : AbstractJob
$attemptMax
return AbstractJob

setAuthor() public method

public setAuthor ( $author )
$author

setCallbackDone() public method

public setCallbackDone ( $job ) : AbstractJob
$job
return AbstractJob

setCallbackError() public method

public setCallbackError ( $job ) : AbstractJob
$job
return AbstractJob

setCallbackFailure() public method

public setCallbackFailure ( $job ) : AbstractJob
$job
return AbstractJob

setCallbackSuccess() public method

public setCallbackSuccess ( $job ) : AbstractJob
$job
return AbstractJob

setCallbacks() public method

public setCallbacks ( array $callbacks = [] )
$callbacks array

setComment() public method

public setComment ( $comment ) : AbstractJob
$comment
return AbstractJob

setCreateOn() public method

public setCreateOn ( $value ) : AbstractJob
$value
return AbstractJob

setData() public method

public setData ( $key, $value )
$key
$value

setDebug() public method

public setDebug ( $debug ) : AbstractJob
$debug
return AbstractJob

setDeleteOn() public method

public setDeleteOn ( $value ) : AbstractJob
$value
return AbstractJob

setExpiredOn() public method

public setExpiredOn ( $value ) : AbstractJob
$value
return AbstractJob

setId() public method

public setId ( $id ) : AbstractJob
$id
return AbstractJob

setJobClass() protected method

protected setJobClass ( $class ) : AbstractJob
$class
return AbstractJob

setParam() public method

public setParam ( $key, $value )
$key
$value

setParams() public method

public setParams ( array $params = [] )
$params array

setParentId() protected method

protected setParentId ( $parentId ) : AbstractJob
$parentId
return AbstractJob

setPriority() public method

public setPriority ( $priority ) : AbstractJob
$priority
return AbstractJob

setResult() public method

public setResult ( $result, null $data = null ) : ResultException | mixed
$result
$data null
return Cronario\Exception\ResultException | mixed

setSchedule() public method

public setSchedule ( $schedule ) : AbstractJob
$schedule
return AbstractJob

setStartOn() public method

public setStartOn ( $value ) : AbstractJob
$value
return AbstractJob

setSync() public method

public setSync ( $bool ) : AbstractJob
$bool
return AbstractJob

setWorkerClass() public method

public setWorkerClass ( $class ) : AbstractJob
$class
return AbstractJob

unserialize() public method

public unserialize ( string $serialized )
$serialized string

unsetData() public method

public unsetData ( $key )
$key

Property Details

$callbacks protected_oe property

protected array $callbacks
return array

$data protected_oe property

protected array $data
return array

$result protected_oe property

protected ResultException,Cronario\Exception $result
return Cronario\Exception\ResultException

$resultClass protected_oe static_oe property

protected static $resultClass

$workerClass protected_oe property

protected null|string $workerClass
return null | string