Documentation

BodyVisitor extends AbstractRequestVisitor
in package

Visitor used to apply a body to a request

This visitor can use a data parameter of 'expect' to control the Expect header. Set the expect data parameter to false to disable the expect header, or set the value to an integer so that the expect 100-continue header is only added if the Content-Length of the entity body is greater than the value.

Table of Contents

Methods

after()  : mixed
Called after visiting all parameters
visit()  : mixed
Called once for each parameter being visited that matches the location type
addExpectHeader()  : mixed
Add the appropriate expect header to a request
prepareValue()  : array<string|int, mixed>|mixed
Prepare (filter and set desired name for request item) the value for request.
resolveRecursively()  : array<string|int, mixed>
Map nested parameters into the location_key based parameters

Methods

prepareValue()

Prepare (filter and set desired name for request item) the value for request.

protected prepareValue(mixed $value, Parameter $param) : array<string|int, mixed>|mixed
Parameters
$value : mixed
$param : Parameter
Return values
array<string|int, mixed>|mixed

resolveRecursively()

Map nested parameters into the location_key based parameters

protected resolveRecursively(array<string|int, mixed> $value, Parameter $param) : array<string|int, mixed>
Parameters
$value : array<string|int, mixed>

Value to map

$param : Parameter

Parameter that holds information about the current key

Return values
array<string|int, mixed>

Returns the mapped array


        
On this page

Search results