public static function getMimetype($name)
    {
        $parts = explode('.', $name);
        if (count($parts) > 1) {
            $ext = strtolower(end($parts));
            if (isset(self::$mime_types[$ext])) {
                return self::$mime_types[$ext];
            }
        }

        return null;
    }
public static function getMimetype($name)
    {
        $parts = explode('.', $name);
        if (count($parts) > 1) {
            $ext = strtolower(end($parts));
            if (isset(self::$mime_types[$ext])) {
                return self::$mime_types[$ext];
            }
        }

        return null;
    }
public static function getMimetype ( $ name ) { $ parts = explode ( '.' , $ name ) ; if ( count ( $ parts ) > 1 ) { $ ext = strtolower ( end ( $ parts ) ) ; if ( isset ( self :: $ mime_types [ $ ext ] ) ) { return self :: $ mime_types [ $ ext ] ; } } return null ; }
Get the content-type value of http header from the file's extension name.

@param string $name Default file extension name.
@return string content-type
Get the content - type value of http header from the file s extension name .