PHP Class GuzzleHttp\Psr7\Response

Inheritance: implements Psr\Http\Message\ResponseInterface, use trait GuzzleHttp\Psr7\MessageTrait
Show file Open project: nystudio107/instantanalytics Class Usage Examples

Public Methods

Method Description
__construct ( integer $status = 200, array $headers = [], string | null | resource | Psr\Http\Message\StreamInterface $body = null, string $version = '1.1', string | null $reason = null )
getReasonPhrase ( )
getStatusCode ( )
withStatus ( $code, $reasonPhrase = '' )

Method Details

__construct() public method

public __construct ( integer $status = 200, array $headers = [], string | null | resource | Psr\Http\Message\StreamInterface $body = null, string $version = '1.1', string | null $reason = null )
$status integer Status code
$headers array Response headers
$body string | null | resource | Psr\Http\Message\StreamInterface Response body
$version string Protocol version
$reason string | null Reason phrase (when empty a default will be used based on the status code)

getReasonPhrase() public method

public getReasonPhrase ( )

getStatusCode() public method

public getStatusCode ( )

withStatus() public method

public withStatus ( $code, $reasonPhrase = '' )