ContentNegotiationTrait
trait ContentNegotiationTrait
Basic content negotiation.
Properties
Request | $request | ||
Response | $response |
Methods
bool
expectsType(array $mimeTypes, string|null $suffix = null)
Does the client expect the provided mime type?
bool
expectsJson()
Does the client expect JSON?
bool
expectsXml()
Does the client expect XML?
bool
respondWithType(array $mimeTypes, string|null $suffix = null)
Should we respond with the provided mime type?
bool
respondWithJson()
Should we respond with JSON?
bool
respondWithXml()
Should we respond with XML?
Details
at line 28
protected bool
expectsType(array $mimeTypes, string|null $suffix = null)
Does the client expect the provided mime type?
at line 45
protected bool
expectsJson()
Does the client expect JSON?
at line 55
protected bool
expectsXml()
Does the client expect XML?
at line 67
protected bool
respondWithType(array $mimeTypes, string|null $suffix = null)
Should we respond with the provided mime type?
at line 84
protected bool
respondWithJson()
Should we respond with JSON?
at line 94
protected bool
respondWithXml()
Should we respond with XML?