public static function getTypeFromExt($ext) {
        if (isset(self::$_types[$ext])) {
            $mime = self::$_types[$ext];

            if (is_array($mime)) {
                $mime = $mime[0];
            }

            return $mime;
        }

        throw new InvalidArgumentException(sprintf('Invalid extension %s', $ext));
    }
public static function getTypeFromExt($ext) {
        if (isset(self::$_types[$ext])) {
            $mime = self::$_types[$ext];

            if (is_array($mime)) {
                $mime = $mime[0];
            }

            return $mime;
        }

        throw new InvalidArgumentException(sprintf('Invalid extension %s', $ext));
    }
public static function getTypeFromExt ( $ ext ) { if ( isset ( self :: $ _types [ $ ext ] ) ) { $ mime = self :: $ _types [ $ ext ] ; if ( is_array ( $ mime ) ) { $ mime = $ mime [ 0 ] ; } return $ mime ; } throw new InvalidArgumentException ( sprintf ( 'Invalid extension %s' , $ ext ) ) ; }
Return a mime type based on extension.

@param string $ext
@return string
@throws InvalidArgumentException
static
Return a mime type based on extension .