Abstract Class craft\queue\BaseJob
- Inheritance
- craft\queue\BaseJob ยป yii\base\BaseObject
- Implements
- craft\queue\JobInterface, yii\base\Configurable
- Subclasses
- craft\queue\jobs\DeleteStaleTemplateCaches, craft\queue\jobs\FindAndReplace, craft\queue\jobs\GeneratePendingTransforms, craft\queue\jobs\LocalizeRelations, craft\queue\jobs\ResaveElements, craft\queue\jobs\UpdateElementSlugsAndUris
- Available since version
- 3.0
- Source Code
- https://github.com/craftcms/cms/blob/master/src/queue/BaseJob.php
Job is the base class for classes representing jobs in terms of objects.
Property | Type | Description | Defined By |
---|---|---|---|
$description |
string, null | The configured job description | craft\queue\BaseJob |
Method | Description | Defined By |
---|---|---|
__call() |
Calls the named method which is not a class method. | yii\base\BaseObject |
__construct() |
Constructor. | yii\base\BaseObject |
__get() |
Returns the value of an object property. | yii\base\BaseObject |
__isset() |
Checks if a property is set, i.e. defined and not null. | yii\base\BaseObject |
__set() |
Sets value of an object property. | yii\base\BaseObject |
__unset() |
Sets an object property to null. | yii\base\BaseObject |
canGetProperty() |
Returns a value indicating whether a property can be read. | yii\base\BaseObject |
canSetProperty() |
Returns a value indicating whether a property can be set. | yii\base\BaseObject |
className() |
Returns the fully qualified name of this class. | yii\base\BaseObject |
execute() |
craft\queue\JobInterface | |
getDescription() |
Returns the description that should be used for the job. | craft\queue\BaseJob |
hasMethod() |
Returns a value indicating whether a method is defined. | yii\base\BaseObject |
hasProperty() |
Returns a value indicating whether a property is defined. | yii\base\BaseObject |
init() |
Initializes the object. | craft\queue\BaseJob |
Method | Description | Defined By |
---|---|---|
defaultDescription() |
Returns a default description for getDescription(). | craft\queue\BaseJob |
setProgress() |
Sets the job progress on the queue. | craft\queue\BaseJob |
Property Details
$description
public property
#
The configured job description
public string, null $description = null
Method Details
defaultDescription()
protected method
#
Returns a default description for getDescription().
protected string, null defaultDescription ( )
getDescription()
public method
#
Returns the description that should be used for the job.
public string, null getDescription ( )
init()
public method
#
Initializes the object.
This method is invoked at the end of the constructor after the object is initialized with the given configuration.
public void init ( )
setProgress()
protected method
#
Sets the job progress on the queue.
protected void setProgress ( $queue, \craft\queue\float $progress )
$queue |
\yii\queue\Queue, craft\queue\QueueInterface | |
$progress |
float | A number between 0 and 1 |