FormatExif Class Reference

List of all members.

Public Member Functions

 FormatExif ($exif)
 Constructor.
 getFormattedData ()
 Numbers given by Exif user agents are often magical, that is they should be replaced by a detailed explanation depending on their value which most of the time are plain integers.
 msg ($tag, $val, $arg=null)
 Convenience function for getFormattedData().
 formatNum ($num)
 Format a number, convert numbers from fractions into floating point numbers.
 formatFraction ($num)
 Format a rational number, reducing fractions.
 gcd ($a, $b)
 Calculate the greatest common divisor of two integers.

Public Attributes

 $mExif


Detailed Description

Todo:
document (e.g. one-sentence class-overview description)

Definition at line 606 of file Exif.php.


Member Function Documentation

FormatExif::FormatExif ( exif  ) 

Constructor.

Parameters:
$exif Array: the Exif data to format ( as returned by Exif::getFilteredData() )

Definition at line 621 of file Exif.php.

FormatExif::formatFraction ( num  ) 

Format a rational number, reducing fractions.

Access:
private
Parameters:
$num Mixed: the value to format
Returns:
mixed A floating point number or whatever we were fed

Definition at line 1098 of file Exif.php.

References formatNum(), and gcd().

Referenced by getFormattedData().

FormatExif::formatNum ( num  ) 

Format a number, convert numbers from fractions into floating point numbers.

Access:
private
Parameters:
$num Mixed: the value to format
Returns:
mixed A floating point number or whatever we were fed

Definition at line 1082 of file Exif.php.

Referenced by formatFraction(), and getFormattedData().

FormatExif::gcd ( a,
b 
)

Calculate the greatest common divisor of two integers.

Parameters:
$a Integer: FIXME
$b Integer: FIXME
Returns:
int
Access:
private

Definition at line 1120 of file Exif.php.

Referenced by formatFraction().

FormatExif::getFormattedData (  ) 

Numbers given by Exif user agents are often magical, that is they should be replaced by a detailed explanation depending on their value which most of the time are plain integers.

This function formats Exif values into human readable form.

Returns:
array

Definition at line 633 of file Exif.php.

References $wgLang, formatFraction(), formatNum(), msg(), wfMsg(), and wfTimestamp().

FormatExif::msg ( tag,
val,
arg = null 
)

Convenience function for getFormattedData().

Access:
private
Parameters:
$tag String: the tag name to pass on
$val String: the value of the tag
$arg String: an argument to pass ($1)
Returns:
string A wfMsg of "exif-$tag-$val" in lower case

Definition at line 1065 of file Exif.php.

References $wgContLang, and wfMsg().

Referenced by getFormattedData().


Member Data Documentation

FormatExif::$mExif

Definition at line 613 of file Exif.php.


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

Generated on Sat Sep 5 02:08:38 2009 for MediaWiki by  doxygen 1.5.9