/** A fake value for things we don't want or don't support. */
const IGNORE = -1;
- //@{
- /* @var array
- * @private
+ /** @var array Exif tags grouped by category, the tagname itself is the key
+ * and the type is the value, in the case of more than one possible value
+ * type they are separated by commas.
*/
+ private $mExifTags;
- /**
- * Exif tags grouped by category, the tagname itself is the key and the type
- * is the value, in the case of more than one possible value type they are
- * separated by commas.
- */
- var $mExifTags;
-
- /**
- * The raw Exif data returned by exif_read_data()
- */
- var $mRawExifData;
+ /** @var array The raw Exif data returned by exif_read_data() */
+ private $mRawExifData;
- /**
- * A Filtered version of $mRawExifData that has been pruned of invalid
- * tags and tags that contain content they shouldn't contain according
- * to the Exif specification
+ /** @var array A Filtered version of $mRawExifData that has been pruned
+ * of invalid tags and tags that contain content they shouldn't contain
+ * according to the Exif specification
*/
- var $mFilteredExifData;
+ private $mFilteredExifData;
- /**
- * Filtered and formatted Exif data, see FormatMetadata::getFormattedData()
- */
- var $mFormattedExifData;
+ /** @var array Filtered and formatted Exif data, see FormatMetadata::getFormattedData() */
+ private $mFormattedExifData;
- //@}
+ /** @var string The file being processed */
+ private $file;
- //@{
- /* @var string
- * @private
- */
+ /** @var string The basename of the file being processed */
+ private $basename;
- /**
- * The file being processed
- */
- var $file;
+ /** @var string The private log to log to, e.g. 'exif' */
+ private $log = false;
- /**
- * The basename of the file being processed
- */
- var $basename;
-
- /**
- * The private log to log to, e.g. 'exif'
- */
- var $log = false;
-
- /**
- * The byte order of the file. Needed because php's
- * extension doesn't fully process some obscure props.
+ /** @var string The byte order of the file. Needed because php's extension
+ * doesn't fully process some obscure props.
*/
private $byteOrder;
- //@}
-
/**
* Constructor
*
- * @param string $file filename.
+ * @param string $file Filename.
* @param string $byteOrder Type of byte ordering either 'BE' (Big Endian)
* or 'LE' (Little Endian). Default ''.
* @throws MWException
* @todo FIXME: The following are broke:
- * SubjectArea. Need to test the more obscure tags.
- *
- * DigitalZoomRatio = 0/0 is rejected. need to determine if that's valid.
- * possibly should treat 0/0 = 0. need to read exif spec on that.
+ * SubjectArea. Need to test the more obscure tags.
+ * DigitalZoomRatio = 0/0 is rejected. need to determine if that's valid.
+ * Possibly should treat 0/0 = 0. need to read exif spec on that.
*/
function __construct( $file, $byteOrder = '' ) {
/**
# Exif IFD Attribute Information (p30-31)
'EXIF' => array(
- # TODO: NOTE: Nonexistence of this field is taken to mean nonconformance
+ # @todo NOTE: Nonexistence of this field is taken to mean nonconformance
# to the Exif 2.1 AND 2.2 standards
'ExifVersion' => Exif::UNDEFINED, # Exif version
'FlashPixVersion' => Exif::UNDEFINED, # Supported Flashpix version #p32
* Convert an Exif::UNDEFINED from a raw binary string
* to its value. This is sometimes needed depending on
* the type of UNDEFINED field
- * @param string $prop name of property
+ * @param string $prop Name of property
*/
private function exifPropToOrd( $prop ) {
if ( isset( $this->mFilteredExifData[$prop] ) ) {
/**
* Convert gps in exif form to a single floating point number
* for example 10 degress 20`40`` S -> -10.34444
- * @param string $prop a gps coordinate exif tag name (like GPSLongitude)
+ * @param string $prop A GPS coordinate exif tag name (like GPSLongitude)
*/
private function exifGPStoNumber( $prop ) {
$loc =& $this->mFilteredExifData[$prop];
/**#@+
* Validates if a tag value is of the type it should be according to the Exif spec
*
- * @private
- *
- * @param $in Mixed: the input value to check
+ * @param mixed $in The input value to check
* @return bool
*/
private function isByte( $in ) {
}
/**
- * @param $in
+ * @param mixed $in The input value to check
* @return bool
*/
private function isASCII( $in ) {
}
/**
- * @param $in
+ * @param mixed $in The input value to check
* @return bool
*/
private function isShort( $in ) {
}
/**
- * @param $in
+ * @param mixed $in The input value to check
* @return bool
*/
private function isLong( $in ) {
}
/**
- * @param $in
+ * @param mixed $in The input value to check
* @return bool
*/
private function isRational( $in ) {
}
/**
- * @param $in
+ * @param mixed $in The input value to check
* @return bool
*/
private function isUndefined( $in ) {
}
/**
- * @param $in
+ * @param mixed $in The input value to check
* @return bool
*/
private function isSlong( $in ) {
}
/**
- * @param $in
+ * @param mixed $in The input value to check
* @return bool
*/
private function isSrational( $in ) {
/**
* Validates if a tag has a legal value according to the Exif spec
*
- * @private
* @param string $section section where tag is located.
* @param string $tag the tag to check.
- * @param $val Mixed: the value of the tag.
- * @param $recursive Boolean: true if called recursively for array types.
+ * @param mixed $val The value of the tag.
+ * @param bool $recursive True if called recursively for array types.
* @return bool
*/
private function validate( $section, $tag, $val, $recursive = false ) {
/**
* Convenience function for debugging output
*
- * @private
- *
- * @param $in Mixed:
- * @param $fname String:
- * @param $action Mixed: , default NULL.
+ * @param mixed $in Arrays will be processed with print_r().
+ * @param string $fname Function name to log.
+ * @param string|bool|null $action Default null.
*/
private function debug( $in, $fname, $action = null ) {
if ( !$this->log ) {
/**
* Convenience function for debugging output
*
- * @private
- *
* @param string $fname the name of the function calling this function
- * @param $io Boolean: Specify whether we're beginning or ending
+ * @param bool $io Specify whether we're beginning or ending
*/
private function debugFile( $fname, $io ) {
if ( !$this->log ) {