Documentation

HeaderSelector

Warning:

This class subject to change without prior notice, Please dont use this class directly.

Tags
category

Class

Table of Contents

selectHeaders()  : array<string|int, mixed>
selectHeadersForMultipart()  : array<string|int, mixed>
selectAcceptHeader()  : string
Return the header 'Accept' based on an array of Accept provided
selectContentTypeHeader()  : string
Return the content type based on an array of content-type provided

Methods

selectHeaders()

public selectHeaders(array<string|int, string> $accept, array<string|int, string> $contentTypes) : array<string|int, mixed>
Parameters
$accept : array<string|int, string>
$contentTypes : array<string|int, string>
Return values
array<string|int, mixed>

selectHeadersForMultipart()

public selectHeadersForMultipart(array<string|int, string> $accept) : array<string|int, mixed>
Parameters
$accept : array<string|int, string>
Return values
array<string|int, mixed>

selectAcceptHeader()

Return the header 'Accept' based on an array of Accept provided

private selectAcceptHeader(array<string|int, string> $accept) : string
Parameters
$accept : array<string|int, string>

Array of header

Return values
string

Accept (e.g. application/json)

selectContentTypeHeader()

Return the content type based on an array of content-type provided

private selectContentTypeHeader(array<string|int, string> $contentType) : string
Parameters
$contentType : array<string|int, string>

Array fo content-type

Return values
string

Content-Type (e.g. application/json)

Search results