Sets the list of media types on which the GZ compression is enabled (if enabled).

@param iterable $contentTypes
182989
public function setGzCompressibleContentTypes(iterable $contentTypes):void
    {
        if ($contentTypes instanceof \Traversable) {
            $this->gzCompressibleContentTypes = iterator_to_array($contentTypes);
        }
        else {
            $this->gzCompressibleContentTypes = (array)$contentTypes;
        }
    }
585011
public void setBinaryMediaTypes(List<MediaType> binaryMediaTypes) {
        requestMessageConverters.stream()
                                .filter(converter -> converter instanceof ByteArrayHttpMessageConverter)
                                .map(ByteArrayHttpMessageConverter.class::cast)
                                .forEach(converter -> converter.setSupportedMediaTypes(binaryMediaTypes));

        responseMessageConverters.stream()
                                .filter(converter -> converter instanceof ByteArrayHttpMessageConverter)
                                .map(ByteArrayHttpMessageConverter.class::cast)
                                .forEach(converter -> converter.setSupportedMediaTypes(binaryMediaTypes));
    }
570232
public function setContentType($contentType)
    {
        $allowedTypes = array(
            'text/html',
            'text/xml',
            'text/htmlraw',
            'text/raw'
        );

        if (!in_array(strtolower($contentType), $allowedTypes)) {
            throw new \InvalidArgumentException(
                "Illegal content type, allowed content types are " . implode(', ', $allowedTypes)
            );
        }
        $this->contentType = $contentType;

        return $this;
    }
712448
public function setContentType(string $contentType): SetContentTypeHandlerInterface
    {
        $this->contentType = $this->normalizeContentType($contentType);
        return $this;
    }
517512
public function setAllowedTypes($types)
    {
        $this->allowedTypes = [];
        $token = ' ,;';
        $type = strtok($types, $token);
        while ($type !== false) {
            $this->allowedTypes[] = $type;
            $type = strtok($token);
        }
    }
920481
public function setContenttype($contenttype)
    {
        if (is_string($contenttype)) {
            $contenttype = $this->app['storage']->getContenttype($contenttype);
        }

        $this->contenttype = $contenttype;
    }
1055742
public void setSupportedMediaTypes(List<MediaType> supportedMediaTypes) {
		Assert.notEmpty(supportedMediaTypes, "'supportedMediaTypes' must not be empty");
		this.supportedMediaTypes = new ArrayList<MediaType>(supportedMediaTypes);
	}
1147266
public function setType($type)
    {
        if (in_array($type, array_keys($this->devices))) {
            $this->type = $type;
        }
    }
1206799
public function setSupportedMediaTypes(array $mediaTypes)
    {
        foreach ($mediaTypes as $mediaType => $converterClass) {
            if (!is_string($mediaType)) {
                throw new Exception('Media type must be a string.');
            }

            if (!is_string($converterClass)) {
                throw new Exception('Converter class name must be a string.');
            }
        }

        $this->supportedMediaTypes = $mediaTypes;
    }
1070213
public function setContentType($contentType) {
    $this->contentType = $contentType;
    
    $ct = $this->contentType;
    if (isset($this->charset))
      $ct .= '; charset='.$this->charset;

    $this->setMeta('content-type',$ct, TRUE);
  }
765034
public function setPossibleTypes(array $possibleTypes)
    {
        foreach ($possibleTypes as $type) {
            $this->possibleTypes[] = ApiDefinition::determineType(\trim($type), ['type' => \trim($type)]);
        }

        return $this;
    }
294108
public Part<T> setContentType(MediaType contentType) {
        headers.add(HttpHeaders.CONTENT_TYPE, contentType.toString());
        return this;
    }
582086
public function accepts($contentTypes)
    {
        $accepts = $this->getAcceptableContentTypes();

        if (count($accepts) === 0) {
            return true;
        }

        $types = (array) $contentTypes;

        foreach ($accepts as $accept) {
            if ($accept === '*/*' || $accept === '*') {
                return true;
            }

            foreach ($types as $type) {
                if ($this->matchesType($accept, $type) || $accept === strtok($type, '/').'/*') {
                    return true;
                }
            }
        }

        return false;
    }
103529
public void setEnableLogTypes(java.util.Collection<String> enableLogTypes) {
        if (enableLogTypes == null) {
            this.enableLogTypes = null;
            return;
        }

        this.enableLogTypes = new com.amazonaws.internal.SdkInternalList<String>(enableLogTypes);
    }
188858
protected function determineResponseType($availableTypes)
    {
        $bestType = $this->contentNegotiation->negotiateMedia($availableTypes);
        if ($bestType instanceof Accept\Media\MediaValue) {
            $contentType = $bestType->getValue();
            $subType = $bestType->getSubtype();
            $this->contentType = $contentType;
            return $contentType;
        }
    }
279020
public function setDefaultMediaType($defaultMediaType)
    {
        if (!\in_array($defaultMediaType, $this->defaultMediaTypes, true)) {
            return;
        }
        $this->defaultMediaTypes[] = $defaultMediaType;
    }
767841
public void setContentType(String contentType) throws InvalidArgumentException {
    if (Strings.isNullOrEmpty(contentType)) {
      throw new InvalidArgumentException("empty content type");
    }

    this.contentType = contentType;
  }