MediaWiki  1.30.0
PdfImage Class Reference

inspired by djvuimage from Brion Vibber modified and written by xarax More...

Public Member Functions

 __construct ( $filename)
 
 getImageSize ()
 
 isValid ()
 
 retrieveMetaData ()
 

Static Public Member Functions

static getPageSize ( $data, $page)
 

Protected Member Functions

 convertDumpToArray ( $dump)
 
 postProcessDump (array $data)
 Postprocess the metadata (convert xmp into useful form, etc) More...
 

Detailed Description

inspired by djvuimage from Brion Vibber modified and written by xarax

Definition at line 30 of file PdfHandler.image.php.

Member Function Documentation

◆ __construct()

PdfImage::__construct (   $filename)
Parameters
$filename

Definition at line 35 of file PdfHandler.image.php.

◆ convertDumpToArray()

PdfImage::convertDumpToArray (   $dump)
protected
Parameters
$dumpstring
Returns
array|bool

Definition at line 152 of file PdfHandler.image.php.

References $line, $lines, $matches, $value, as, captcha-old::count, and postProcessDump().

Referenced by retrieveMetaData().

◆ getImageSize()

PdfImage::getImageSize ( )
Returns
array|bool

Definition at line 49 of file PdfHandler.image.php.

◆ getPageSize()

static PdfImage::getPageSize (   $data,
  $page 
)
static
Parameters
$dataarray
$page
Returns
array|bool

Definition at line 67 of file PdfHandler.image.php.

References $t, and global.

Referenced by PdfHandler::getDimensionInfo().

◆ isValid()

PdfImage::isValid ( )
Returns
bool

Definition at line 42 of file PdfHandler.image.php.

◆ postProcessDump()

PdfImage::postProcessDump ( array  $data)
protected

Postprocess the metadata (convert xmp into useful form, etc)

This is used to generate the metadata table at the bottom of the image description page.

Parameters
$dataArray metadata
Returns
Array post-processed metadata

Definition at line 204 of file PdfHandler.image.php.

References $type, as, captcha-old::count, and wfTimestamp().

Referenced by convertDumpToArray().

◆ retrieveMetaData()

PdfImage::retrieveMetaData ( )
Returns
array|bool|null

Definition at line 112 of file PdfHandler.image.php.

References $retval, as, convertDumpToArray(), global, page, pages, text, wfDebug(), wfEscapeShellArg(), and wfShellExec().


The documentation for this class was generated from the following file: