# ImageType Class Reference
[Common wrapper and helper classes]

PHP's image type constants. More...

Inheritance diagram for ImageType:
[legend]

List of all members.

## Public Member Functions

| getMimeType ()
| getExtension ()
| getExtensionList ()

## Static Public Member Functions

static | getAnyId ()
| must return any existent ID 1 should be ok for most enumerations
static | createByFileName ($fileName)

## Public Attributes

const | IMAGETYPE_PJPEG = 100
const | GIF = IMAGETYPE_GIF
const | JPEG = IMAGETYPE_JPEG
const | PNG = IMAGETYPE_PNG
const | SWF = IMAGETYPE_SWF
const | PSD = IMAGETYPE_PSD
const | BMP = IMAGETYPE_BMP
const | TIFF_II = IMAGETYPE_TIFF_II
const | TIFF_MM = IMAGETYPE_TIFF_MM
const | JPC = IMAGETYPE_JPC
const | JP2 = IMAGETYPE_JP2
const | JPX = IMAGETYPE_JPX
const | JB2 = IMAGETYPE_JB2
const | SWC = IMAGETYPE_SWC
const | IFF = IMAGETYPE_IFF
const | WBMP = IMAGETYPE_WBMP
const | JPEG2000 = IMAGETYPE_JPEG2000
const | XBM = IMAGETYPE_XBM
const | PJPEG = self::IMAGETYPE_PJPEG

## Protected Attributes

| $names
| $extensions
| $mimeTypes

## Detailed Description

PHP's image type constants.

Definition at line 17 of file ImageType.class.php.

## Member Function Documentation

static ImageType::createByFileName | ( | $ | fileName | ) | `[static]`

Definition at line 126 of file ImageType.class.php.

References getAnyId().

Here is the call graph for this function:

static ImageType::getAnyId | ( |  | ) | `[static]`

must return any existent ID 1 should be ok for most enumerations

Reimplemented from Enumeration.

Definition at line 104 of file ImageType.class.php.

Referenced by createByFileName().

ImageType::getExtension | ( |  | ) |

Definition at line 114 of file ImageType.class.php.

ImageType::getExtensionList | ( |  | ) |

Definition at line 121 of file ImageType.class.php.

ImageType::getMimeType | ( |  | ) |

Definition at line 109 of file ImageType.class.php.

## Member Data Documentation

ImageType::$extensions`[protected]`

Initial value:

     array(
                'gif'   => IMAGETYPE_GIF,
                'jpg'   => IMAGETYPE_JPEG,
                'jpeg'  => IMAGETYPE_JPEG,
                'pjpeg' => self::IMAGETYPE_PJPEG,
                'png'   => IMAGETYPE_PNG,
                'swf'   => IMAGETYPE_SWF,
                'psd'   => IMAGETYPE_PSD,
                'bmp'   => IMAGETYPE_BMP,
                'tif'   => IMAGETYPE_TIFF_II,
                'tiff'  => IMAGETYPE_TIFF_II,
                'jpc'   => IMAGETYPE_JPC,
                'jp2'   => IMAGETYPE_JP2,
                'jpx'   => IMAGETYPE_JPX,
                'jb2'   => IMAGETYPE_JB2,
                'swc'   => IMAGETYPE_SWC,
                'iff'   => IMAGETYPE_IFF,
                'wbmp'  => IMAGETYPE_WBMP,
                'jpc'   => IMAGETYPE_JPEG2000,
                'xbm'   => IMAGETYPE_XBM
            )

Definition at line 61 of file ImageType.class.php.

ImageType::$mimeTypes`[protected]`

Initial value:

     array(
                IMAGETYPE_GIF           => 'image/gif',
                IMAGETYPE_JPEG          => 'image/jpeg',
                IMAGETYPE_PNG           => 'image/png',
                IMAGETYPE_SWF           => 'application/x-shockwave-flash',
                IMAGETYPE_PSD           => 'image/x-photoshop',
                IMAGETYPE_BMP           => 'image/bmp',
                IMAGETYPE_TIFF_II       => 'image/tiff',
                IMAGETYPE_TIFF_MM       => 'image/tiff',
                IMAGETYPE_JPC           => 'image/jpc',
                IMAGETYPE_JP2           => 'image/jp2',
                IMAGETYPE_JPX           => 'image/jpx',
                IMAGETYPE_JB2           => 'image/jb2',
                IMAGETYPE_SWC           => 'application/x-shockwave-flash',
                IMAGETYPE_IFF           => 'image/iff',
                IMAGETYPE_WBMP          => 'image/vnd.wap.wbmp',
                IMAGETYPE_JPEG2000      => 'image/jpeg',
                IMAGETYPE_XBM           => 'image/xbm',
                self::IMAGETYPE_PJPEG   => 'image/pjpeg'
            )

Definition at line 83 of file ImageType.class.php.

ImageType::$names`[protected]`

Initial value:

     array(
                IMAGETYPE_GIF           => 'gif',
                IMAGETYPE_JPEG          => 'jpeg',
                IMAGETYPE_PNG           => 'png',
                IMAGETYPE_SWF           => 'swf',
                IMAGETYPE_PSD           => 'psd',
                IMAGETYPE_BMP           => 'bmp',
                IMAGETYPE_TIFF_II       => 'tif',
                IMAGETYPE_TIFF_MM       => 'tif',
                IMAGETYPE_JPC           => 'jpc',
                IMAGETYPE_JP2           => 'jp2',
                IMAGETYPE_JPX           => 'jpx',
                IMAGETYPE_JB2           => 'jb2',
                IMAGETYPE_SWC           => 'swc',
                IMAGETYPE_IFF           => 'iff',
                IMAGETYPE_WBMP          => 'bmp',
                IMAGETYPE_JPEG2000      => 'jpc',
                IMAGETYPE_XBM           => 'xbm',
                self::IMAGETYPE_PJPEG   => 'jpeg'
            )

Reimplemented from Enumeration.

Definition at line 40 of file ImageType.class.php.

const ImageType::BMP = IMAGETYPE_BMP

Definition at line 26 of file ImageType.class.php.

const ImageType::GIF = IMAGETYPE_GIF

Definition at line 21 of file ImageType.class.php.

Referenced by TuringImage::outputImage().

const ImageType::IFF = IMAGETYPE_IFF

Definition at line 34 of file ImageType.class.php.

const ImageType::IMAGETYPE_PJPEG = 100

Definition at line 19 of file ImageType.class.php.

const ImageType::JB2 = IMAGETYPE_JB2

Definition at line 32 of file ImageType.class.php.

const ImageType::JP2 = IMAGETYPE_JP2

Definition at line 30 of file ImageType.class.php.

const ImageType::JPC = IMAGETYPE_JPC

Definition at line 29 of file ImageType.class.php.

const ImageType::JPEG = IMAGETYPE_JPEG

Definition at line 22 of file ImageType.class.php.

Referenced by TuringImage::outputImage().

const ImageType::JPEG2000 = IMAGETYPE_JPEG2000

Definition at line 36 of file ImageType.class.php.

const ImageType::JPX = IMAGETYPE_JPX

Definition at line 31 of file ImageType.class.php.

const ImageType::PJPEG = self::IMAGETYPE_PJPEG

Definition at line 38 of file ImageType.class.php.

const ImageType::PNG = IMAGETYPE_PNG

Definition at line 23 of file ImageType.class.php.

Referenced by TuringImage::outputImage().

const ImageType::PSD = IMAGETYPE_PSD

Definition at line 25 of file ImageType.class.php.

const ImageType::SWC = IMAGETYPE_SWC

Definition at line 33 of file ImageType.class.php.

const ImageType::SWF = IMAGETYPE_SWF

Definition at line 24 of file ImageType.class.php.

const ImageType::TIFF_II = IMAGETYPE_TIFF_II

Definition at line 27 of file ImageType.class.php.

const ImageType::TIFF_MM = IMAGETYPE_TIFF_MM

Definition at line 28 of file ImageType.class.php.

const ImageType::WBMP = IMAGETYPE_WBMP

Definition at line 35 of file ImageType.class.php.

Referenced by TuringImage::outputImage().

const ImageType::XBM = IMAGETYPE_XBM

Definition at line 37 of file ImageType.class.php.

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

- main/Base/ImageType.class.php