protected function resolveType($contentType)
    {
        $mapped = $this->getMimeType($contentType);
        if ($mapped) {
            return is_array($mapped) ? current($mapped) : $mapped;
        }
        if (strpos($contentType, '/') === false) {
            throw new InvalidArgumentException(sprintf('"%s" is an invalid content type.', $contentType));
        }

        return $contentType;
    }
protected function resolveType($contentType)
    {
        $mapped = $this->getMimeType($contentType);
        if ($mapped) {
            return is_array($mapped) ? current($mapped) : $mapped;
        }
        if (strpos($contentType, '/') === false) {
            throw new InvalidArgumentException(sprintf('"%s" is an invalid content type.', $contentType));
        }

        return $contentType;
    }
protected function resolveType ( $ contentType ) { $ mapped = $ this -> getMimeType ( $ contentType ) ; if ( $ mapped ) { return is_array ( $ mapped ) ? current ( $ mapped ) : $ mapped ; } if ( strpos ( $ contentType , '/' ) === false ) { throw new InvalidArgumentException ( sprintf ( '"%s" is an invalid content type.' , $ contentType ) ) ; } return $ contentType ; }
Translate and validate content-types.

@param string $contentType The content-type or type alias.
@return string The resolved content-type
@throws \InvalidArgumentException When an invalid content-type or alias is used.
Translate and validate content - types .