Class Guzzle\Service\Command\DefaultRequestSerializer

InheritanceGuzzle\Service\Command\DefaultRequestSerializer
ImplementsGuzzle\Service\Command\RequestSerializerInterface

Default request serializer that transforms command options and operation parameters into a request

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
createRequest() Create a request for the command and operation Guzzle\Service\Command\DefaultRequestSerializer
prepareAdditionalParameters() Serialize additional parameters Guzzle\Service\Command\DefaultRequestSerializer

Property Details

$factory protected property

Visitor factory

$instance protected static property
protected static self $instance null

Method Details

__construct() public method

public void __construct ( Guzzle\Service\Command\LocationVisitor\VisitorFlyweight $factory )
$factory Guzzle\Service\Command\LocationVisitor\VisitorFlyweight

Factory to use when creating visitors

addVisitor() public method

Add a location visitor to the serializer

public self addVisitor ( $location, Guzzle\Service\Command\LocationVisitor\Request\RequestVisitorInterface $visitor )
$location string

Location to associate with the visitor

$visitor Guzzle\Service\Command\LocationVisitor\Request\RequestVisitorInterface

Visitor to attach

createRequest() protected method

Create a request for the command and operation

protected Guzzle\Http\Message\RequestInterface createRequest ( Guzzle\Service\Command\CommandInterface $command )
$command Guzzle\Service\Command\CommandInterface

Command to create a request for

getInstance() public static method

public static self getInstance ( )
prepare() public method

public void prepare ( Guzzle\Service\Command\CommandInterface $command )
$command
prepareAdditionalParameters() protected method

Serialize additional parameters

protected null|Guzzle\Service\Command\LocationVisitor\Request\RequestVisitorInterface prepareAdditionalParameters ( Guzzle\Service\Description\OperationInterface $operation, Guzzle\Service\Command\CommandInterface $command, Guzzle\Http\Message\RequestInterface $request, Guzzle\Service\Description\Parameter $additional )
$operation Guzzle\Service\Description\OperationInterface

Operation that owns the command

$command Guzzle\Service\Command\CommandInterface

Command to prepare

$request Guzzle\Http\Message\RequestInterface

Request to serialize

$additional Guzzle\Service\Description\Parameter

Additional parameters