ResponseContentTypeHandler

A handler which sets the response content type automatically according to the best <code>Accept</code> header match.

The header is set only if:

  • no object is stored in the routing context under the name @see \io\vertx\jphp\ext\web\handler\ResponseContentTypeHandler
  • a match is found
  • the header is not present already
  • content length header is absent or set to something different than zero
package

Default

Methods

__construct

__construct() 

Create a response content type handler.

create( $arg0 = null) : \io\vertx\jphp\ext\web\handler\ResponseContentTypeHandler
static

create()

Create a response content type handler with a custom disable flag.

param $disableFlag [string] create($disableFlag)

Arguments

$arg0

string

Response

\io\vertx\jphp\ext\web\handler\ResponseContentTypeHandler

the response content type handler

Something has happened, so handle it.

handle( $arg0) : void

Arguments

$arg0

RoutingContext

Constants

DEFAULT_DISABLE_FLAG

DEFAULT_DISABLE_FLAG
var

php文件只是为了写代码方便,常量的实际值请参考原java文件