Documentation

Encoding
in package
implements OpenApiAttributeInterface

The attribute may be used to add encoding details to the definition of a parameter, request or response content, by defining it as field {@see Content::$encoding}

Interfaces, Classes, Traits and Enums

OpenApiAttributeInterface

Table of Contents

$allowReserved  : bool
$contentType  : string
$explode  : bool|null
$extensions  : array<string|int, mixed>
$headers  : array<string|int, mixed>
$name  : string
$style  : string
__construct()  : mixed

Properties

$allowReserved

public bool $allowReserved = false

$contentType

public string $contentType = ""

$explode

public bool|null $explode = false

$extensions

public array<string|int, mixed> $extensions = []

$headers

public array<string|int, mixed> $headers = []

Methods

__construct()

public __construct([string $name = "" ][, string $contentType = "" ][, string $style = "" ][, bool|null $explode = false ][, bool $allowReserved = false ][, array<string|int, Header$headers = [] ][, array<string|int, Extension$extensions = [] ]) : mixed
Parameters
$name : string = ""

The name of this encoding object instance. This property is a key in encoding map of MediaType object and MUST exist in a schema as a property.

$contentType : string = ""

The Content-Type for encoding a specific property.

$style : string = ""

Describes how a specific property value will be serialized depending on its type.

$explode : bool|null = false

When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map.

$allowReserved : bool = false

Determines whether the parameter value SHOULD allow reserved characters, as defined by RFC3986 to be included without percent-encoding.

$headers : array<string|int, Header> = []

An array of header objects.

$extensions : array<string|int, Extension> = []

The list of optional extensions

Return values
mixed

Search results