����JFIF��x�x����'
| Server IP : 78.140.185.180 / Your IP : 216.73.216.170 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/./././www/vendor/guzzle/guzzle/src/Guzzle/Service/Command/ |
Upload File : |
<?php
namespace Guzzle\Service\Command;
/**
* A command that creates requests based on {@see Guzzle\Service\Description\OperationInterface} objects, and if the
* matching operation uses a service description model in the responseClass attribute, then this command will marshal
* the response into an associative array based on the JSON schema of the model.
*/
class OperationCommand extends AbstractCommand
{
/** @var RequestSerializerInterface */
protected $requestSerializer;
/** @var ResponseParserInterface Response parser */
protected $responseParser;
/**
* Set the response parser used with the command
*
* @param ResponseParserInterface $parser Response parser
*
* @return self
*/
public function setResponseParser(ResponseParserInterface $parser)
{
$this->responseParser = $parser;
return $this;
}
/**
* Set the request serializer used with the command
*
* @param RequestSerializerInterface $serializer Request serializer
*
* @return self
*/
public function setRequestSerializer(RequestSerializerInterface $serializer)
{
$this->requestSerializer = $serializer;
return $this;
}
/**
* Get the request serializer used with the command
*
* @return RequestSerializerInterface
*/
public function getRequestSerializer()
{
if (!$this->requestSerializer) {
// Use the default request serializer if none was found
$this->requestSerializer = DefaultRequestSerializer::getInstance();
}
return $this->requestSerializer;
}
/**
* Get the response parser used for the operation
*
* @return ResponseParserInterface
*/
public function getResponseParser()
{
if (!$this->responseParser) {
// Use the default response parser if none was found
$this->responseParser = OperationResponseParser::getInstance();
}
return $this->responseParser;
}
protected function build()
{
// Prepare and serialize the request
$this->request = $this->getRequestSerializer()->prepare($this);
}
protected function process()
{
// Do not process the response if 'command.response_processing' is set to 'raw'
$this->result = $this[self::RESPONSE_PROCESSING] == self::TYPE_RAW
? $this->request->getResponse()
: $this->getResponseParser()->parse($this);
}
}