Documentation

ContentFormatterHelper.php

Table of Contents

Functions

findContentFormatter()  : object|null
Tries to find a content formatter by its mime type
getDeclaredContentFormatters()  : array<string|int, string>
Gets all declared content formatters
getRequestedResponseContentFormatter()  : mixed
Tries to get the requested response content formatter
getRequestedResponseFormat()  : null|array<string|int, mixed>
Gets the requested response format

Functions

findContentFormatter()

Tries to find a content formatter by its mime type

findContentFormatter(mixed $mimeType) : object|null
Parameters
$mimeType : mixed

The mime type to search for

Return values
object|null

getDeclaredContentFormatters()

Gets all declared content formatters

getDeclaredContentFormatters() : array<string|int, string>
Return values
array<string|int, string>

getRequestedResponseContentFormatter()

Tries to get the requested response content formatter

getRequestedResponseContentFormatter([mixed $default = null ]) : mixed
Parameters
$default : mixed = null

The default formatter to return if none is found

getRequestedResponseFormat()

Gets the requested response format

getRequestedResponseFormat() : null|array<string|int, mixed>
Return values
null|array<string|int, mixed>

        
On this page

Search results