/** * APIResponse constructor. * * @param string $body * @param object $jsonBody * @param string $signature */ public function __construct($body, $jsonBody, $signature) { $this->protocol = $_SERVER['SERVER_PROTOCOL']; $this->method = $_SERVER['REQUEST_METHOD']; $this->path = $_SERVER['REQUEST_URI'] . $_SERVER['QUERY_STRING']; // TODO checkme $this->remoteAddress = $_SERVER['REMOTE_ADDR']; $this->headers = APIRequest::getAllHeaders(); $this->body = $body; $this->jsonBody = $jsonBody; $this->signature = $signature; }