Documentation

AbstractJob
in package
implements JobInterface

Abstract job class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
1.2.0

Interfaces, Classes and Traits

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

$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

$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

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

setCallable()

Set job callable

public setCallable(mixed $callable[, mixed $params = null ]) : AbstractJob
Parameters
$callable : mixed
$params : mixed = null
Return values
AbstractJob

setJobDescription()

Set job description

public setJobDescription(string $description) : AbstractJob
Parameters
$description : string
Return values
AbstractJob

runExec()

Run CLI executable command

protected runExec() : mixed
Return values
mixed

Search results