1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
<?php
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);
}
}
|