public function inMimeType($findMe, $mimeTypes)
    {
        foreach ($mimeTypes as $mimeType) {
            if ($mimeType == $findMe) {
                return true;
            }

            $type = strstr($mimeType, '/*', true);
            if ($type && $type === strstr($findMe, '/', true)) {
                return true;
            }
        }
        return false;
    }
public function inMimeType($findMe, $mimeTypes)
    {
        foreach ($mimeTypes as $mimeType) {
            if ($mimeType == $findMe) {
                return true;
            }

            $type = strstr($mimeType, '/*', true);
            if ($type && $type === strstr($findMe, '/', true)) {
                return true;
            }
        }
        return false;
    }
public function inMimeType ( $ findMe , $ mimeTypes ) { foreach ( $ mimeTypes as $ mimeType ) { if ( $ mimeType == $ findMe ) { return true ; } $ type = strstr ( $ mimeType , '/*' , true ) ; if ( $ type && $ type === strstr ( $ findMe , '/' , true ) ) { return true ; } } return false ; }
Checks if a mime type exists in a mime type array

@param string $findMe    The mime type to be searched
@param array $mimeTypes  The mime type array, allow element likes
"image/*" to match all image mime type, such as
"image/gif", "image/jpeg", etc
@return boolean
Checks if a mime type exists in a mime type array