SilverStripe\MimeValidator\MimeUploadValidator::compareMime
Check two MIME types roughly match eachother.
Before we check MIME types, remove known prefixes "vnd.", "x-" etc. If there is a suffix, we'll use that to compare. Examples: application/x-json = json application/json = json application/xhtml+xml = xml application/xml = xml
Signature
public function compareMime(string
$first,
string
$second )
Parameters
$first
— string- The first MIME type to compare to the second
$second
— string- The second MIME type to compare to the first
Returns
- boolean