Open Journal Systems  3.3.0
Guzzle\Service\Command\DefaultRequestSerializer Class Reference
Inheritance diagram for Guzzle\Service\Command\DefaultRequestSerializer:
Guzzle\Service\Command\RequestSerializerInterface

Public Member Functions

 __construct (VisitorFlyweight $factory)
 
 addVisitor ($location, RequestVisitorInterface $visitor)
 
 prepare (CommandInterface $command)
 

Static Public Member Functions

static getInstance ()
 

Protected Member Functions

 createRequest (CommandInterface $command)
 
 prepareAdditionalParameters (OperationInterface $operation, CommandInterface $command, RequestInterface $request, Parameter $additional)
 

Protected Attributes

 $factory
 

Static Protected Attributes

static $instance
 

Detailed Description

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

Definition at line 14 of file DefaultRequestSerializer.php.

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Service\Command\DefaultRequestSerializer::__construct ( VisitorFlyweight  $factory)
Parameters
VisitorFlyweight$factoryFactory to use when creating visitors

Definition at line 41 of file DefaultRequestSerializer.php.

References Guzzle\Service\Command\DefaultRequestSerializer\$factory.

Member Function Documentation

◆ addVisitor()

Guzzle\Service\Command\DefaultRequestSerializer::addVisitor (   $location,
RequestVisitorInterface  $visitor 
)

Add a location visitor to the serializer

Parameters
string$locationLocation to associate with the visitor
RequestVisitorInterface$visitorVisitor to attach
Returns
self

Definition at line 54 of file DefaultRequestSerializer.php.

◆ createRequest()

Guzzle\Service\Command\DefaultRequestSerializer::createRequest ( CommandInterface  $command)
protected

Create a request for the command and operation

Parameters
CommandInterface$commandCommand to create a request for
Returns
RequestInterface

Definition at line 146 of file DefaultRequestSerializer.php.

References Guzzle\Service\Command\CommandInterface\getClient(), Guzzle\Service\Command\CommandInterface\getOperation(), and Guzzle\Service\Command\AbstractCommand\REQUEST_OPTIONS.

Referenced by Guzzle\Service\Command\DefaultRequestSerializer\prepare().

◆ getInstance()

◆ prepare()

Guzzle\Service\Command\DefaultRequestSerializer::prepare ( CommandInterface  $command)

◆ prepareAdditionalParameters()

Guzzle\Service\Command\DefaultRequestSerializer::prepareAdditionalParameters ( OperationInterface  $operation,
CommandInterface  $command,
RequestInterface  $request,
Parameter  $additional 
)
protected

Serialize additional parameters

Parameters
OperationInterface$operationOperation that owns the command
CommandInterface$commandCommand to prepare
RequestInterface$requestRequest to serialize
Parameter$additionalAdditional parameters
Returns
null|RequestVisitorInterface

Definition at line 112 of file DefaultRequestSerializer.php.

References Guzzle\Service\Description\Parameter\getLocation(), Guzzle\Service\Description\OperationInterface\hasParam(), Guzzle\Service\Description\Parameter\setName(), and Guzzle\Common\ToArrayInterface\toArray().

Referenced by Guzzle\Service\Command\DefaultRequestSerializer\prepare().

Field Documentation

◆ $factory

VisitorFlyweight Guzzle\Service\Command\DefaultRequestSerializer::$factory
protected

$factory Visitor factory

Definition at line 20 of file DefaultRequestSerializer.php.

Referenced by Guzzle\Service\Command\DefaultRequestSerializer\__construct().

◆ $instance

Guzzle\Service\Command\DefaultRequestSerializer::$instance
staticprotected

The documentation for this class was generated from the following file: