\GuzzleHttp\Command\GuzzleSerializer

Serializes requests for a given command.

Summary

Methods
Properties
Constants
__construct()
__invoke()
No public properties found
No constants found
prepareRequest()
createRequest()
No protected properties found
N/A
createCommandWithUri()
$locations
$description
N/A

Properties

$locations

$locations : \GuzzleHttp\Command\Guzzle\RequestLocation\RequestLocationInterface[]

Type

RequestLocationInterface[]

$description

$description : \GuzzleHttp\Command\Guzzle\DescriptionInterface

Type

DescriptionInterface

Methods

__construct()

__construct(\GuzzleHttp\Command\Guzzle\DescriptionInterface  $description, \GuzzleHttp\Command\Guzzle\RequestLocation\RequestLocationInterface[]  $requestLocations = []) : mixed

Parameters

\GuzzleHttp\Command\Guzzle\DescriptionInterface $description
\GuzzleHttp\Command\Guzzle\RequestLocation\RequestLocationInterface[] $requestLocations

Extra request locations

Returns

mixed —

__invoke()

__invoke(\GuzzleHttp\Command\CommandInterface  $command) : \Psr\Http\Message\RequestInterface

Parameters

\GuzzleHttp\Command\CommandInterface $command

Returns

\Psr\Http\Message\RequestInterface —

prepareRequest()

prepareRequest(\GuzzleHttp\Command\CommandInterface  $command, \Psr\Http\Message\RequestInterface  $request) : \Psr\Http\Message\RequestInterface

Prepares a request for sending using location visitors

Parameters

\GuzzleHttp\Command\CommandInterface $command
\Psr\Http\Message\RequestInterface $request

Request being created

Throws

\RuntimeException

If a location cannot be handled

Returns

\Psr\Http\Message\RequestInterface —

createRequest()

createRequest(\GuzzleHttp\Command\CommandInterface  $command) : \Psr\Http\Message\RequestInterface

Create a request for the command and operation

Parameters

\GuzzleHttp\Command\CommandInterface $command

Throws

\RuntimeException

Returns

\Psr\Http\Message\RequestInterface —

createCommandWithUri()

createCommandWithUri(\GuzzleHttp\Command\Guzzle\Operation  $operation, \GuzzleHttp\Command\CommandInterface  $command) : \GuzzleHttp\Psr7\Request

Create a request for an operation with a uri merged onto a base URI

Parameters

\GuzzleHttp\Command\Guzzle\Operation $operation
\GuzzleHttp\Command\CommandInterface $command

Returns

\GuzzleHttp\Psr7\Request —