MediaWiki REL1_31
|
Public Member Functions | |
__construct ( $title, $params) | |
Construct a thumbnail job. | |
run () | |
Run a thumbnail job on a given PDF file. | |
Public Member Functions inherited from Job | |
__construct ( $command, $title, $params=false) | |
allowRetries () | |
getDeduplicationInfo () | |
Subclasses may need to override this to make duplication detection work. | |
getLastError () | |
getParams () | |
getQueuedTimestamp () | |
getReadyTimestamp () | |
getReleaseTimestamp () | |
getRequestId () | |
getRootJobParams () | |
getTitle () | |
getType () | |
hasExecutionFlag ( $flag) | |
hasRootJobParams () | |
ignoreDuplicates () | |
Whether the queue should reject insertion of this job if a duplicate exists. | |
insert () | |
Insert a single job into the queue. | |
isRootJob () | |
teardown ( $status) | |
Do any final cleanup after run(), deferred updates, and all DB commits happen. | |
toString () | |
workItemCount () | |
Static Public Member Functions | |
static | insertJobs ( $upload, $mime, &$error) |
Static Public Member Functions inherited from Job | |
static | batchInsert ( $jobs) |
Batch-insert a group of jobs into the queue. | |
static | factory ( $command, Title $title, $params=[]) |
Create the appropriate object to handle a specific job. | |
static | newRootJobParams ( $key) |
Get "root job" parameters for a task. | |
Public Attributes | |
const | BIG_THUMB = 1 |
Flags for thumbnail jobs. | |
const | SMALL_THUMB = 2 |
Public Attributes inherited from Job | |
string | $command |
array | $metadata = [] |
Additional queue metadata. | |
array | $params |
Array of job parameters. | |
Additional Inherited Members | |
Protected Member Functions inherited from Job | |
addTeardownCallback ( $callback) | |
setLastError ( $error) | |
Protected Attributes inherited from Job | |
string | $error |
Text for error that occurred last. | |
int | $executionFlags = 0 |
Bitfield of JOB_* class constants. | |
bool | $removeDuplicates |
Expensive jobs may set this to true. | |
callable[] | $teardownCallbacks = [] |
Title | $title |
Definition at line 3 of file CreatePdfThumbnailsJob.php.
CreatePdfThumbnailsJob::__construct | ( | $title, | |
$params ) |
Construct a thumbnail job.
Title | $title | Title object |
array | $params | Associative array of options: page: page number for which the thumbnail will be created jobtype: CreatePDFThumbnailsJob::BIG_THUMB or CreatePDFThumbnailsJob::SMALL_THUMB BIG_THUMB will create a thumbnail visible for full thumbnail view, SMALL_THUMB will create a thumbnail shown in "previous page"/"next page" boxes |
Definition at line 20 of file CreatePdfThumbnailsJob.php.
References Job\$params.
|
static |
UploadBase | $upload | |
string | $mime | |
string | &$error |
Definition at line 95 of file CreatePdfThumbnailsJob.php.
References Job\$metadata, $mime, JobQueueGroup\singleton(), unserialize(), and wfDebugLog().
CreatePdfThumbnailsJob::run | ( | ) |
Run a thumbnail job on a given PDF file.
Reimplemented from Job.
Definition at line 28 of file CreatePdfThumbnailsJob.php.
References $wgImageLimits, BIG_THUMB, User\getDefaultOption(), Linker\makeThumbLinkObj(), SMALL_THUMB, wfDebugLog(), and wfLocalFile().
const CreatePdfThumbnailsJob::BIG_THUMB = 1 |
Flags for thumbnail jobs.
Definition at line 7 of file CreatePdfThumbnailsJob.php.
Referenced by run().
const CreatePdfThumbnailsJob::SMALL_THUMB = 2 |
Definition at line 8 of file CreatePdfThumbnailsJob.php.
Referenced by run().