/** * @param bool|null $asArray */ public function __construct($asArray = null) { if (!is_null($asArray)) { $this->asArray = $asArray; } parent::__construct(); }
/** * @param XmlObjectConverterInterface|null $xmlConverter */ public function __construct(XmlObjectConverterInterface $xmlConverter = null) { if (is_null($xmlConverter)) { $xmlConverter = app(XmlObjectConverterInterface::class); } $this->xmlConverter = $xmlConverter; parent::__construct(); }
/** * @param ServiceRequestInterface $request * @param mixed $response * @param ServiceResponseInformationInterface $responseInformation optional * @param string $functionName * @return ServiceResponseInterface */ public function interpret(ServiceRequestInterface $request, $response, ServiceResponseInformationInterface $responseInformation = null, $functionName = null) { $this->function = $functionName; if ($this->isUninterpretableResponse($responseInformation->getStatusCode())) { $this->interpretedResponse->setData($response); $this->interpretedResponse->setStatusCode($responseInformation->getStatusCode()); return $this->interpretedResponse; } return parent::interpret($request, $response, $responseInformation); }