private function _getImageTypeFromFileName($imageFile)
    {
        $ext = strtolower((string)pathinfo($imageFile, PATHINFO_EXTENSION));

        if ('jpg' === $ext or 'jpeg' === $ext) {
            return ImageType::JPEG;
        } else if ('gif' === $ext) {
            return ImageType::GIF;
        } else if ('png' === $ext) {
            return ImageType::PNG;
        } else if ('wbm' === $ext or 'wbmp' === $ext) {
            return ImageType::WBMP;
        } else {
            return ImageType::UNKNOWN;
        }
    }
private function _getImageTypeFromFileName($imageFile)
    {
        $ext = strtolower((string)pathinfo($imageFile, PATHINFO_EXTENSION));

        if ('jpg' === $ext or 'jpeg' === $ext) {
            return ImageType::JPEG;
        } else if ('gif' === $ext) {
            return ImageType::GIF;
        } else if ('png' === $ext) {
            return ImageType::PNG;
        } else if ('wbm' === $ext or 'wbmp' === $ext) {
            return ImageType::WBMP;
        } else {
            return ImageType::UNKNOWN;
        }
    }
private function _getImageTypeFromFileName ( $ imageFile ) { $ ext = strtolower ( ( string ) pathinfo ( $ imageFile , PATHINFO_EXTENSION ) ) ; if ( 'jpg' === $ ext or 'jpeg' === $ ext ) { return ImageType :: JPEG ; } else if ( 'gif' === $ ext ) { return ImageType :: GIF ; } else if ( 'png' === $ ext ) { return ImageType :: PNG ; } else if ( 'wbm' === $ ext or 'wbmp' === $ ext ) { return ImageType :: WBMP ; } else { return ImageType :: UNKNOWN ; } }
Get image type base on file extension.

@param int $imageFile File path to image.

@return ImageType string Type of image.
Get image type base on file extension .