Properties

$id

$id : string

Job ID

Type

string

$description

$description : string

Job Description

Type

string

$callable

$callable : \Pop\Utils\CallableObject

Job callable

Type

\Pop\Utils\CallableObject

$command

$command : string

Job application command

Type

string

$exec

$exec : string

Job CLI executable command

Type

string

$running

$running : boolean

Job running flag

Type

boolean

$completed

$completed : boolean

Job completed flag

Type

boolean

$failed

$failed : boolean

Job failed flag

Type

boolean

$attemptOnce

$attemptOnce : boolean

Attempt once flag

Type

boolean

$serializedClosure

$serializedClosure : \Closure

Serialize closure

Type

\Closure

$serializedParameters

$serializedParameters : array

Serialize parameters

Type

array

Methods

__construct()

__construct(mixed  $callable = null, mixed  $params = null, string  $id = null, string  $description = null) 

Constructor

Instantiate the job object

Parameters

mixed $callable
mixed $params
string $id
string $description

generateJobId()

generateJobId() : string

Generate job ID

Returns

string

getJobId()

getJobId() : string

Get job ID

Returns

string

hasJobId()

hasJobId() : boolean

Has job ID

Returns

boolean

setJobDescription()

setJobDescription(string  $description) : \Pop\Queue\Processor\Jobs\AbstractJob

Set job description

Parameters

string $description

Returns

\Pop\Queue\Processor\Jobs\AbstractJob

getJobDescription()

getJobDescription() : string

Get job description

Returns

string

hasJobDescription()

hasJobDescription() : boolean

Has job description

Returns

boolean

setCallable()

setCallable(mixed  $callable, mixed  $params = null) : \Pop\Queue\Processor\Jobs\AbstractJob

Set job callable

Parameters

mixed $callable
mixed $params

Returns

\Pop\Queue\Processor\Jobs\AbstractJob

getCallable()

getCallable() : \Pop\Utils\CallableObject

Get job callable

Returns

\Pop\Utils\CallableObject

getCommand()

getCommand() : string

Get job application command

Returns

string

getExec()

getExec() : string

Get job CLI executable command

Returns

string

hasCallable()

hasCallable() : boolean

Has job callable

Returns

boolean

hasCommand()

hasCommand() : boolean

Has job application command

Returns

boolean

hasExec()

hasExec() : boolean

Has job CLI executable command

Returns

boolean

attemptOnce()

attemptOnce(boolean  $attemptOnce = true) : \Pop\Queue\Processor\Jobs\JobInterface

Set job to only attempt once

Parameters

boolean $attemptOnce

Returns

\Pop\Queue\Processor\Jobs\JobInterface

isAttemptOnce()

isAttemptOnce() : boolean

Set job to only attempt to run once

Returns

boolean

isRunning()

isRunning() : boolean

Is job running

Returns

boolean

isComplete()

isComplete() : boolean

Is job complete

Returns

boolean

hasFailed()

hasFailed() : boolean

Has job failed

Returns

boolean

run()

run(\Pop\Application  $application = null) : mixed

Run job

Parameters

\Pop\Application $application

Returns

mixed

__sleep()

__sleep() : array

Sleep magic method

Returns

array

__wakeup()

__wakeup() : void

Wakeup magic method

command()

command(string  $command, string  $id = null) : \Pop\Queue\Processor\Jobs\AbstractJob

Create a job object with an application command

Parameters

string $command
string $id

Returns

\Pop\Queue\Processor\Jobs\AbstractJob

exec()

exec(string  $command, string  $id = null) : \Pop\Queue\Processor\Jobs\AbstractJob

Create a job object with a CLI executable command

Parameters

string $command
string $id

Returns

\Pop\Queue\Processor\Jobs\AbstractJob

loadCallable()

loadCallable(\Pop\Application  $application = null) : mixed

Load callable

Parameters

\Pop\Application $application

Throws

\Pop\Queue\Processor\Jobs\Exception

Returns

mixed

runCommand()

runCommand(\Pop\Application  $application) : mixed

Run application command

Parameters

\Pop\Application $application

Returns

mixed

runExec()

runExec() : mixed

Run CLI executable command

Returns

mixed