MediaWiki REL1_32
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 32 of file PdfImage.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 42 of file PdfImage.php.

Member Function Documentation

◆ convertDumpToArray()

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

Definition at line 175 of file PdfImage.php.

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

Referenced by retrieveMetaData().

◆ getImageSize()

PdfImage::getImageSize ( )
Returns
array|bool

Definition at line 56 of file PdfImage.php.

References getPageSize().

◆ getPageSize()

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

Definition at line 74 of file PdfImage.php.

References $t.

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

◆ isValid()

PdfImage::isValid ( )
Returns
bool

Definition at line 49 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 227 of file PdfImage.php.

References $type, and wfTimestamp().

Referenced by convertDumpToArray().

◆ retrieveMetaData()

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

Definition at line 119 of file PdfImage.php.

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

Member Data Documentation

◆ $mFilename

string PdfImage::$mFilename
private

Definition at line 37 of file PdfImage.php.

Referenced by retrieveMetaData().


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