|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /var/www/flavourapps.com/user.flavourapps.com/vendor/facade/flare-client-php/src/Http/ |
Upload File : |
<?php
namespace Facade\FlareClient\Http;
class Response
{
private $headers;
private $body;
private $error;
public function __construct($headers, $body, $error)
{
$this->headers = $headers;
$this->body = $body;
$this->error = $error;
}
/**
* @return mixed
*/
public function getHeaders()
{
return $this->headers;
}
/**
* @return mixed
*/
public function getBody()
{
return $this->body;
}
/**
* @return bool
*/
public function hasBody()
{
return $this->body != false;
}
/**
* @return mixed
*/
public function getError()
{
return $this->error;
}
/**
* @return null|int
*/
public function getHttpResponseCode()
{
if (! isset($this->headers['http_code'])) {
return;
}
return (int) $this->headers['http_code'];
}
}