PHP Class Bitpay\Client\Response

Inheritance: implements Bitpay\Client\ResponseInterface
Show file Open project: bitpay/php-client Class Usage Examples

Protected Properties

Property Type Description
$body string
$headers array
$raw string
$statusCode integer

Public Methods

Method Description
__construct ( $raw = null )
__toString ( ) : string Returns the raw http response
createFromRawResponse ( $rawResponse )
getBody ( )
getHeaders ( )
getStatusCode ( )
setBody ( string $body ) Set the body of the response
setHeader ( string $header, string $value )
setStatusCode ( $statusCode ) : Bitpay\Client\ResponseInterface

Method Details

__construct() public method

public __construct ( $raw = null )

__toString() public method

Returns the raw http response
public __toString ( ) : string
return string

createFromRawResponse() public static method

public static createFromRawResponse ( $rawResponse )

getBody() public method

public getBody ( )

getHeaders() public method

public getHeaders ( )

getStatusCode() public method

public getStatusCode ( )

setBody() public method

Set the body of the response
public setBody ( string $body )
$body string

setHeader() public method

public setHeader ( string $header, string $value )
$header string
$value string

setStatusCode() public method

public setStatusCode ( $statusCode ) : Bitpay\Client\ResponseInterface
return Bitpay\Client\ResponseInterface

Property Details

$body protected property

protected string $body
return string

$headers protected property

protected array $headers
return array

$raw protected property

protected string $raw
return string

$statusCode protected property

protected int $statusCode
return integer