public static function getTypeName($type) { switch ($type) { case self::IFD0: return '0'; case self::IFD1: return '1'; case self::EXIF: return 'Exif'; case self::GPS: return 'GPS'; case self::INTEROPERABILITY: return 'Interoperability'; default: throw new PelIfdException('Unknown IFD type: %d', $type); } }