MediaWiki REL1_35
|
Job queue task description base code. More...
Public Member Functions | |
__construct ( $type, array $params, array $opts=[], Title $title=null) | |
getDeduplicationInfo () | |
Subclasses may need to override this to make duplication detection work. | |
getParams () | |
getReleaseTimestamp () | |
getRootJobParams () | |
getTitle () | |
getType () | |
hasRootJobParams () | |
ignoreDuplicates () | |
isRootJob () | |
toSerializableArray () | |
Static Public Member Functions | |
static | newFromArray (array $map) |
Protected Member Functions | |
validateParams (array $params) | |
Protected Attributes | |
array | $opts |
array | $params |
Array of job parameters or false if none. | |
Title | $title |
string | $type |
Job queue task description base code.
Example usage:
Definition at line 39 of file JobSpecification.php.
JobSpecification::__construct | ( | $type, | |
array | $params, | ||
array | $opts = [] , |
||
Title | $title = null |
||
) |
string | $type | |
array | $params | Map of key/values |
array | $opts | Map of key/values 'removeDuplicates' key - whether to remove duplicate jobs 'removeDuplicatesIgnoreParams' key - array with parameters to ignore for deduplication |
Title | null | $title | Optional descriptive title |
Definition at line 60 of file JobSpecification.php.
References $opts, $params, $title, $type, Title\getDBkey(), Title\getNamespace(), NS_SPECIAL, and validateParams().
JobSpecification::getDeduplicationInfo | ( | ) |
Subclasses may need to override this to make duplication detection work.
The resulting map conveys everything that makes the job unique. This is only checked if ignoreDuplicates() returns true, meaning that duplicate jobs are supposed to be ignored.
Implements IJobSpecification.
Definition at line 118 of file JobSpecification.php.
References getParams(), and getType().
JobSpecification::getParams | ( | ) |
Implements IJobSpecification.
Definition at line 104 of file JobSpecification.php.
References $params.
Referenced by getDeduplicationInfo().
JobSpecification::getReleaseTimestamp | ( | ) |
Implements IJobSpecification.
Definition at line 108 of file JobSpecification.php.
References wfTimestampOrNull().
JobSpecification::getRootJobParams | ( | ) |
Implements IJobSpecification.
Definition at line 139 of file JobSpecification.php.
JobSpecification::getTitle | ( | ) |
Definition at line 100 of file JobSpecification.php.
References $title.
JobSpecification::getType | ( | ) |
Implements IJobSpecification.
Definition at line 96 of file JobSpecification.php.
References $type.
Referenced by getDeduplicationInfo().
JobSpecification::hasRootJobParams | ( | ) |
Implements IJobSpecification.
Definition at line 146 of file JobSpecification.php.
Referenced by isRootJob().
JobSpecification::ignoreDuplicates | ( | ) |
Implements IJobSpecification.
Definition at line 114 of file JobSpecification.php.
JobSpecification::isRootJob | ( | ) |
Implements IJobSpecification.
Definition at line 151 of file JobSpecification.php.
References hasRootJobParams().
|
static |
array | $map | Field/value map |
Definition at line 176 of file JobSpecification.php.
References $title.
Referenced by EnqueueJob\run().
JobSpecification::toSerializableArray | ( | ) |
Definition at line 159 of file JobSpecification.php.
|
protected |
array | $params |
Definition at line 86 of file JobSpecification.php.
References $params, and validateParams().
Referenced by __construct(), and validateParams().
|
protected |
Definition at line 50 of file JobSpecification.php.
Referenced by __construct(), and toSerializableArray().
|
protected |
Array of job parameters or false if none.
Definition at line 44 of file JobSpecification.php.
Referenced by __construct(), getParams(), toSerializableArray(), and validateParams().
|
protected |
Definition at line 47 of file JobSpecification.php.
Referenced by __construct(), getTitle(), and newFromArray().
|
protected |
Definition at line 41 of file JobSpecification.php.
Referenced by __construct(), getType(), and toSerializableArray().