* SPDX-License-Identifier: AGPL-3.0-only ************************************/ /* crmv@170283 */ namespace RestService; /** * This client does not send any HTTP data, * instead it just returns the value. * * Good for testing purposes. */ class InternalClient extends Client { public function sendResponse($pHttpCode = '200', $pMessage) { $pMessage = array_reverse($pMessage, true); $pMessage['status'] = $pHttpCode+0; $pMessage = array_reverse($pMessage, true); $method = $this->getOutputFormatMethod($this->getOutputFormat()); return $this->$method($pMessage); } }