protected function getContentType($format)
    {
        // Check if it's already MIME
        if (\Jasny\str_contains($format, '/')) {
            return $format;
        }
        
        $repository = new ApacheMimeTypes();
        $mime = $repository->findType($format);

        if (!isset($mime)) {
            throw new \UnexpectedValueException("Format '$format' doesn't correspond with a MIME type");
        }
        
        return $mime;
    }
protected function getContentType($format)
    {
        // Check if it's already MIME
        if (\Jasny\str_contains($format, '/')) {
            return $format;
        }
        
        $repository = new ApacheMimeTypes();
        $mime = $repository->findType($format);

        if (!isset($mime)) {
            throw new \UnexpectedValueException("Format '$format' doesn't correspond with a MIME type");
        }
        
        return $mime;
    }
protected function getContentType ( $ format ) { // Check if it's already MIME if ( \ Jasny \ str_contains ( $ format , '/' ) ) { return $ format ; } $ repository = new ApacheMimeTypes ( ) ; $ mime = $ repository -> findType ( $ format ) ; if ( ! isset ( $ mime ) ) { throw new \ UnexpectedValueException ( "Format '$format' doesn't correspond with a MIME type" ) ; } return $ mime ; }
Get MIME type for extension

@param string $format
@return string
Get MIME type for extension