Server IP : 184.154.167.98 / Your IP : 13.59.135.139 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 8.2.26 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/puertode/public_html/tampico1900/3rdparty/aws/aws-sdk-php/src/Api/Parser/ |
Upload File : |
<?php namespace Aws\Api\Parser; use Aws\Api\Service; use Aws\Api\StructureShape; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\StreamInterface; /** * @internal Implements REST-JSON parsing (e.g., Glacier, Elastic Transcoder) */ class RestJsonParser extends AbstractRestParser { use PayloadParserTrait; /** * @param Service $api Service description * @param JsonParser $parser JSON body builder */ public function __construct(Service $api, JsonParser $parser = null) { parent::__construct($api); $this->parser = $parser ?: new JsonParser(); } protected function payload( ResponseInterface $response, StructureShape $member, array &$result ) { $jsonBody = $this->parseJson($response->getBody(), $response); if ($jsonBody) { $result += $this->parser->parse($member, $jsonBody); } } public function parseMemberFromStream( StreamInterface $stream, StructureShape $member, $response ) { $jsonBody = $this->parseJson($stream, $response); if ($jsonBody) { return $this->parser->parse($member, $jsonBody); } return []; } }