Open Journal Systems
3.3.0
|
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 |
Default request serializer that transforms command options and operation parameters into a request
Definition at line 14 of file DefaultRequestSerializer.php.
Guzzle\Service\Command\DefaultRequestSerializer::__construct | ( | VisitorFlyweight | $factory | ) |
VisitorFlyweight | $factory | Factory to use when creating visitors |
Definition at line 41 of file DefaultRequestSerializer.php.
References Guzzle\Service\Command\DefaultRequestSerializer\$factory.
Guzzle\Service\Command\DefaultRequestSerializer::addVisitor | ( | $location, | |
RequestVisitorInterface | $visitor | ||
) |
Add a location visitor to the serializer
string | $location | Location to associate with the visitor |
RequestVisitorInterface | $visitor | Visitor to attach |
Definition at line 54 of file DefaultRequestSerializer.php.
|
protected |
Create a request for the command and operation
CommandInterface | $command | Command to create a request for |
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().
|
static |
Definition at line 29 of file DefaultRequestSerializer.php.
References Guzzle\Service\Command\DefaultRequestSerializer\$instance, and Guzzle\Service\Command\LocationVisitor\VisitorFlyweight\getInstance().
Referenced by Guzzle\Service\Command\OperationCommand\getRequestSerializer(), and Guzzle\Tests\Service\Command\DefaultRequestSerializerTest\setUp().
Guzzle\Service\Command\DefaultRequestSerializer::prepare | ( | CommandInterface | $command | ) |
Create a request for a command
CommandInterface | $command | Command that will own the request |
Implements Guzzle\Service\Command\RequestSerializerInterface.
Definition at line 61 of file DefaultRequestSerializer.php.
References Guzzle\Service\Command\DefaultRequestSerializer\createRequest(), Guzzle\Service\Command\CommandInterface\getOperation(), and Guzzle\Service\Command\DefaultRequestSerializer\prepareAdditionalParameters().
|
protected |
Serialize additional parameters
OperationInterface | $operation | Operation that owns the command |
CommandInterface | $command | Command to prepare |
RequestInterface | $request | Request to serialize |
Parameter | $additional | Additional parameters |
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().
|
protected |
$factory Visitor factory
Definition at line 20 of file DefaultRequestSerializer.php.
Referenced by Guzzle\Service\Command\DefaultRequestSerializer\__construct().
|
staticprotected |
Definition at line 23 of file DefaultRequestSerializer.php.
Referenced by Guzzle\Service\Command\DefaultRequestSerializer\getInstance().