$knownContentTypes
Known handled content types.
protected
array
$knownContentTypes
= ['application/json', 'application/xml', 'text/xml', 'text/html', 'text/plain']
Trait for classes that need to determine a request's accepted content type(s).
$knownContentTypes | Known handled content types. | array |
---|---|---|
determineContentType() | Determine which content type we know about is wanted using Accept header. | string |
Known handled content types.
protected
array
$knownContentTypes
= ['application/json', 'application/xml', 'text/xml', 'text/html', 'text/plain']
Determine which content type we know about is wanted using Accept header.
protected
determineContentType(
$request :
ServerRequestInterface
[, $ajaxDebug :
bool
= false ]
)
: string
Note: This method is a bare-bones implementation designed specifically for Slim's error handling requirements. Consider a fully-feature solution such as willdurand/negotiation for any other situation.