MediaWiki REL1_31
PdfImage Class Reference

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

Collaboration diagram for PdfImage:

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)
 

Private Attributes

string $mFilename
 

Detailed Description

inspired by djvuimage from Brion Vibber modified and written by xarax

Definition at line 31 of file PdfImage.php.

Constructor & Destructor Documentation

◆ __construct()

PdfImage::__construct ( $filename)
Parameters
string$filename

Definition at line 41 of file PdfImage.php.

Member Function Documentation

◆ convertDumpToArray()

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

Definition at line 174 of file PdfImage.php.

References $line, $lines, $matches, $value, and postProcessDump().

Referenced by retrieveMetaData().

◆ getImageSize()

PdfImage::getImageSize ( )
Returns
array|bool

Definition at line 55 of file PdfImage.php.

References getPageSize().

◆ getPageSize()

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

Definition at line 73 of file PdfImage.php.

References $t.

Referenced by PdfHandler\getDimensionInfo(), and getImageSize().

◆ isValid()

PdfImage::isValid ( )
Returns
bool

Definition at line 48 of file PdfImage.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
array$datametadata
Returns
array post-processed metadata

Definition at line 226 of file PdfImage.php.

References $type, and wfTimestamp().

Referenced by convertDumpToArray().

◆ retrieveMetaData()

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

Definition at line 118 of file PdfImage.php.

References $mFilename, $retval, convertDumpToArray(), and pages.

Member Data Documentation

◆ $mFilename

string PdfImage::$mFilename
private

Definition at line 36 of file PdfImage.php.

Referenced by retrieveMetaData().


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