AbstractJob
in package
implements
JobInterface
Abstract job class
Tags
Interfaces, Classes, Traits and Enums
- JobInterface
- Job class
Table of Contents
- $attemptOnce : bool
- Attempt once flag
- $callable : CallableObject
- Job callable
- $command : string
- Job application command
- $completed : bool
- Job completed flag
- $description : string
- Job Description
- $exec : string
- Job CLI executable command
- $failed : bool
- Job failed flag
- $id : string
- Job ID
- $running : bool
- Job running flag
- $serializedClosure : Closure
- Serialize closure
- $serializedParameters : array<string|int, mixed>
- Serialize parameters
- __construct() : mixed
- Constructor
- __sleep() : array<string|int, mixed>
- Sleep magic method
- __wakeup() : void
- Wakeup magic method
- attemptOnce() : JobInterface
- Set job to only attempt once
- generateJobId() : string
- Generate job ID
- getCallable() : CallableObject
- Get job callable
- getCommand() : string
- Get job application command
- getExec() : string
- Get job CLI executable command
- getJobDescription() : string
- Get job description
- getJobId() : string
- Get job ID
- hasCallable() : bool
- Has job callable
- hasCommand() : bool
- Has job application command
- hasExec() : bool
- Has job CLI executable command
- hasFailed() : bool
- Has job failed
- hasJobDescription() : bool
- Has job description
- hasJobId() : bool
- Has job ID
- isAttemptOnce() : bool
- Set job to only attempt to run once
- isComplete() : bool
- Is job complete
- isRunning() : bool
- Is job running
- run() : mixed
- Run job
- setAsCompleted() : JobInterface
- Set job as completed
- setAsFailed() : JobInterface
- Set job as failed
- setAsRunning() : JobInterface
- Set job as running
- setCallable() : AbstractJob
- Set job callable
- setCommand() : AbstractJob
- Set job application command
- setExec() : AbstractJob
- Set job CLI executable command
- setJobDescription() : AbstractJob
- Set job description
- setJobId() : AbstractJob
- Set job ID
- loadCallable() : mixed
- Load callable
- runCommand() : mixed
- Run application command
- runExec() : mixed
- Run CLI executable command
Properties
$attemptOnce
Attempt once flag
protected
bool
$attemptOnce
= false
$callable
Job callable
protected
CallableObject
$callable
= null
$command
Job application command
protected
string
$command
= null
$completed
Job completed flag
protected
bool
$completed
= false
$description
Job Description
protected
string
$description
= null
$exec
Job CLI executable command
protected
string
$exec
= null
$failed
Job failed flag
protected
bool
$failed
= false
$id
Job ID
protected
string
$id
= null
$running
Job running flag
protected
bool
$running
= false
$serializedClosure
Serialize closure
protected
Closure
$serializedClosure
= null
$serializedParameters
Serialize parameters
protected
array<string|int, mixed>
$serializedParameters
= null
Methods
__construct()
Constructor
public
__construct([mixed $callable = null ][, mixed $params = null ][, string $id = null ][, string $description = null ]) : mixed
Instantiate the job object
Parameters
- $callable : mixed = null
- $params : mixed = null
- $id : string = null
- $description : string = null
Return values
mixed —__sleep()
Sleep magic method
public
__sleep() : array<string|int, mixed>
Return values
array<string|int, mixed> —__wakeup()
Wakeup magic method
public
__wakeup() : void
Return values
void —attemptOnce()
Set job to only attempt once
public
attemptOnce([bool $attemptOnce = true ]) : JobInterface
Parameters
- $attemptOnce : bool = true
Return values
JobInterface —generateJobId()
Generate job ID
public
generateJobId() : string
Return values
string —getCallable()
Get job callable
public
getCallable() : CallableObject
Return values
CallableObject —getCommand()
Get job application command
public
getCommand() : string
Return values
string —getExec()
Get job CLI executable command
public
getExec() : string
Return values
string —getJobDescription()
Get job description
public
getJobDescription() : string
Return values
string —getJobId()
Get job ID
public
getJobId() : string
Return values
string —hasCallable()
Has job callable
public
hasCallable() : bool
Return values
bool —hasCommand()
Has job application command
public
hasCommand() : bool
Return values
bool —hasExec()
Has job CLI executable command
public
hasExec() : bool
Return values
bool —hasFailed()
Has job failed
public
hasFailed() : bool
Return values
bool —hasJobDescription()
Has job description
public
hasJobDescription() : bool
Return values
bool —hasJobId()
Has job ID
public
hasJobId() : bool
Return values
bool —isAttemptOnce()
Set job to only attempt to run once
public
isAttemptOnce() : bool
Return values
bool —isComplete()
Is job complete
public
isComplete() : bool
Return values
bool —isRunning()
Is job running
public
isRunning() : bool
Return values
bool —run()
Run job
public
run([Application $application = null ]) : mixed
Parameters
- $application : Application = null
Return values
mixed —setAsCompleted()
Set job as completed
public
setAsCompleted() : JobInterface
Return values
JobInterface —setAsFailed()
Set job as failed
public
setAsFailed() : JobInterface
Return values
JobInterface —setAsRunning()
Set job as running
public
setAsRunning() : JobInterface
Return values
JobInterface —setCallable()
Set job callable
public
setCallable(mixed $callable[, mixed $params = null ]) : AbstractJob
Parameters
- $callable : mixed
- $params : mixed = null
Return values
AbstractJob —setCommand()
Set job application command
public
setCommand(string $command) : AbstractJob
Parameters
- $command : string
Return values
AbstractJob —setExec()
Set job CLI executable command
public
setExec(mixed $command) : AbstractJob
Parameters
- $command : mixed
Return values
AbstractJob —setJobDescription()
Set job description
public
setJobDescription(string $description) : AbstractJob
Parameters
- $description : string
Return values
AbstractJob —setJobId()
Set job ID
public
setJobId(string $id) : AbstractJob
Parameters
- $id : string
Return values
AbstractJob —loadCallable()
Load callable
protected
loadCallable([Application $application = null ]) : mixed
Parameters
- $application : Application = null
Tags
Return values
mixed —runCommand()
Run application command
protected
runCommand(Application $application) : mixed
Parameters
- $application : Application
Return values
mixed —runExec()
Run CLI executable command
protected
runExec() : mixed