Set a list of content types that this resource supports.

@param [string, string, ...]
@return Controller
497994
public function resourceSupports()
    {
        $this->supportedTypes = array_merge(func_get_args(), $this->supportedTypes);
        $this->canClientAcceptThisResponse();

        return $this;
    }
516599
function list(options) {
  return function (req, res) {
    let list,
      listOptions = _.assign({
        prefix: req.uri,
        values: false
      }, options);

    list = db.list(listOptions);

    res.set('Content-Type', 'application/json');
    list.pipe(res);
  };
}
477900
function validateResponseType (type) {
  if (validTypes.indexOf(type) < 0)
    return option.some(`Response content type ${type} is not supported`)
  return option.none
}
1136021
public Controller setAttrs(Map<String, Object> attrMap) {
		for (Map.Entry<String, Object> entry : attrMap.entrySet())
			request.setAttribute(entry.getKey(), entry.getValue());
		return this;
	}
42727
public function setContent($content)
    {
        $this->content = null;
        if ($content === null) {
            return;
        }

        if (TypeHandling::isSimpleType(gettype($content)) && !is_array($content)) {
            $this->content = (string)$content;
        }

        if (is_resource($content)) {
            $this->content = $content;
        }

        return $this;
    }
92336
public static Set<MediaType> set(String... types) {
        Set<MediaType> set = new HashSet<MediaType>();
        for (String type : types) {
            MediaType mt = parse(type);
            if (mt != null) {
                set.add(mt);
            }
        }
        return Collections.unmodifiableSet(set);
    }
321524
public function addController($uriPattern, callable $controller, $method='', $contentType='')
    {
        $routeBuilder = new RouteBuilder();
        $routeBuilder
            ->addUriPattern($uriPattern)
            ->addController($controller, $this->getAppController())
            ->addMethod($method)
            ->addContentType($contentType);

        $route = $routeBuilder->getRoute();
        $this->getRouter()->addRoute($route);
        return $route;
    }
899127
def produces(*content_types):
    
    def inner(o):
        if not all(isinstance(content_type, _compat.string_types) for content_type in content_types):
            raise ValueError("In parameter not a valid value.")
        try:
            getattr(o, 'produces').update(content_types)
        except AttributeError:
            setattr(o, 'produces', set(content_types))
        return o
    return inner
657216
final private function set_control_types() {

		// Early exit if this has already run.
		if ( ! empty( self::$control_types ) ) {
			return;
		}

		self::$control_types = apply_filters( 'kirki_control_types', [] );

		// Make sure the defined classes actually exist.
		foreach ( self::$control_types as $key => $classname ) {
			if ( ! class_exists( $classname ) ) {
				unset( self::$control_types[ $key ] );
			}
		}
	}
203976
def change_content_type(key, content_type)
      client.post_object(container,
                         key,
                         'Content-Type' => content_type)
      true
    rescue Fog::OpenStack::Storage::NotFound
      false
    end
420124
function() {
    this.model.set({
      content:  {
        fields: [{
          title: null,
          alternative_name: null,
          value: 'Loading content...',
          index: null,
          type: "loading"
        }],
        data: {}
      }
    })
    return this;
  }
681348
public Route accepts(String... types) {
        Preconditions.checkNotNull(types);
        final ImmutableSet.Builder<MediaType> builder = new ImmutableSet.Builder<>();
        builder.addAll(this.acceptedMediaTypes);
        for (String s : types) {
            builder.add(MediaType.parse(s));
        }
        this.acceptedMediaTypes = builder.build();
        return this;
    }
1133950
public function setContentType(string $content_type)
    {
        if (empty($content_type)) {
            Throw new HeaderException('Empty content type is not allowed.');
        }

        $this->content_type = $content_type;
    }
1374281
private function seedContentTypes()
    {
        ContentType::firstOrCreate(['name' => 'content', 'handler' => Gzero\Cms\Handlers\Content\ContentHandler::class]);
        ContentType::firstOrCreate(['name' => 'category', 'handler' => Gzero\Cms\Handlers\Content\CategoryHandler::class]);
    }
66744
public function setController(){

		//check if the $urlComponentsArray has more than one value
		if(count($this->urlComponentsArray) > 0){

			//set the value of the controller
			$this->controller = $this->urlComponentsArray[0];

			//return this class instance
			return $this;

		}

		//there are no url params, set controller to null
		else{

			//there are no components in the url string set null for infered controller
			$this->controller = null;

			//return this class instance
			return $this;

		}


	}
496963
def controller
      unless params[:controller]
        raise ControllerExceptions::NotFound,
          "Route matched, but route did not specify a controller.\n" +
          "Did you forgot to add :controller => \"people\" or :controller " +
          "segment to route definition?\nHere is what's specified:\n" +
          route.inspect
      end
      path = [params[:namespace], params[:controller]].compact.join(Merb::Const::SLASH)
      controller = path.snake_case.to_const_string

      begin
        Object.full_const_get(controller)
      rescue NameError => e
        msg = "Controller class not found for controller `#{path}'"
        Merb.logger.warn!(msg)
        raise ControllerExceptions::NotFound, msg
      end
    end
245505
public static Set<MediaType> set(MediaType... types) {
        Set<MediaType> set = new HashSet<MediaType>();
        for (MediaType type : types) {
            if (type != null) {
                set.add(type);
            }
        }
        return Collections.unmodifiableSet(set);
    }