Menu

## Format extends BaseConfig
in package

Format.php : 9

### Table of Contents

#### Properties

$formatterOptions : array<string, int>
  -------------------------------------------------------------------------- Formatters Options --------------------------------------------------------------------------
$formatters : array<string, string>
  -------------------------------------------------------------------------- Formatters --------------------------------------------------------------------------
$supportedResponseFormats : array<int, string>
  -------------------------------------------------------------------------- Available Response Formats --------------------------------------------------------------------------

### Properties

#### $formatterOptions

Format.php : 59

-------------------------------------------------------------------------- Formatters Options --------------------------------------------------------------------------

`public array<string, int> $formatterOptions = ['application/json' => JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES, 'application/xml' => 0, 'text/xml' => 0]`

Additional Options to adjust default formatters behaviour. For each mime type, list the additional options that should be used.

#### $formatters

Format.php : 43

-------------------------------------------------------------------------- Formatters --------------------------------------------------------------------------

`public array<string, string> $formatters = ['application/json' => \CodeIgniter\Format\JSONFormatter::class, 'application/xml' => \CodeIgniter\Format\XMLFormatter::class, 'text/xml' => \CodeIgniter\Format\XMLFormatter::class]`

Lists the class to use to format responses with of a particular type. For each mime type, list the class that should be used. Formatters can be retrieved through the getFormatter() method.

#### $supportedResponseFormats

Format.php : 26

-------------------------------------------------------------------------- Available Response Formats --------------------------------------------------------------------------

`public array<int, string> $supportedResponseFormats = [ 'application/json', 'application/xml', // machine-readable XML 'text/xml', ]`

When you perform content negotiation with the request, these are the available formats that your application supports. This is currently only used with the API\ResponseTrait. A valid Formatter must exist for the specified format.

These formats are only checked when the data passed to the respond() method is an array.

## Search results