mirror of
https://github.com/VTECRM/vtenext.git
synced 2026-02-26 16:18:47 +00:00
28 lines
747 B
PHP
28 lines
747 B
PHP
<?php
|
|
/*************************************
|
|
* SPDX-FileCopyrightText: 2009-2020 Vtenext S.r.l. <info@vtenext.com>
|
|
* 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);
|
|
}
|
|
|
|
} |