concrete/src/Http/RequestMediaTypeParser.php
public function isMediaTypeSupported($mediaType, $minWeight = null)
    {
        $data = $this->getMediaTypeData($mediaType);
        if ($minWeight === null) {
            return $data !== [];
        }
        $minWeight = (float) $minWeight;
        foreach ($data as $item) {
            if ($item['q'] >= $minWeight) {
                return true;
            }
        }

        return false;
    }
public function isMediaTypeSupported($mediaType, $minWeight = null)
    {
        $data = $this->getMediaTypeData($mediaType);
        if ($minWeight === null) {
            return $data !== [];
        }
        $minWeight = (float) $minWeight;
        foreach ($data as $item) {
            if ($item['q'] >= $minWeight) {
                return true;
            }
        }

        return false;
    }
public function isMediaTypeSupported ( $ mediaType , $ minWeight = null ) { $ data = $ this -> getMediaTypeData ( $ mediaType ) ; if ( $ minWeight === null ) { return $ data !== [ ] ; } $ minWeight = ( float ) $ minWeight ; foreach ( $ data as $ item ) { if ( $ item [ 'q' ] >= $ minWeight ) { return true ; } } return false ; }
Check if the client signaled that it supports a media type.

@param string|string[] $mediaType the media type to be checked (a string like 'text/html', or an array like ['text','html'])
@param float|null $minWeight the minimum weight of the found media type (from 0 to 1); if NULL we won't check it

@return bool
Check if the client signaled that it supports a media type .