Go to the documentation of this file.
85 foreach (
$params as $p => $v ) {
86 if ( is_array( $v ) ) {
88 } elseif ( !is_scalar( $v ) && $v !==
null ) {
89 throw new UnexpectedValueException(
"Job parameter $p is not JSON serializable." );
107 return isset( $this->params[
'jobReleaseTimestamp'] )
113 return !empty( $this->opts[
'removeDuplicates'] );
119 'namespace' => $this->
getTitle()->getNamespace(),
120 'title' => $this->
getTitle()->getDBkey(),
123 if ( is_array( $info[
'params'] ) ) {
125 unset( $info[
'params'][
'rootJobSignature'] );
126 unset( $info[
'params'][
'rootJobTimestamp'] );
128 unset( $info[
'params'][
'jobReleaseTimestamp'] );
136 'rootJobSignature' => $this->params[
'rootJobSignature'] ??
null,
137 'rootJobTimestamp' => $this->params[
'rootJobTimestamp'] ?? null
142 return isset( $this->params[
'rootJobSignature'] )
143 && isset( $this->params[
'rootJobTimestamp'] );
147 return $this->
hasRootJobParams() && !empty( $this->params[
'rootJobIsSelf'] );
160 'ns' => $this->title->getNamespace(),
161 'key' => $this->title->getDBkey()
174 return new self( $map[
'type'], $map[
'params'], $map[
'opts'],
$title );
__construct( $type, array $params, array $opts=[], Title $title=null)
static newFromArray(array $map)
getDBkey()
Get the main part with underscores.
getNamespace()
Get the namespace index, i.e.
wfTimestampOrNull( $outputtype=TS_UNIX, $ts=null)
Return a formatted timestamp, or null if input is null.
static makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
array $params
Array of job parameters or false if none.
validateParams(array $params)
Represents a title within MediaWiki.
Job queue task description base code.
getDeduplicationInfo()
Subclasses may need to override this to make duplication detection work.
Interface for serializable objects that describe a job queue task.