Container for all response-related methods.

package SLS_PHP_SDK

 Methods

Constructs a new instance of this class.

__construct(array $header, string $body, integer $status = null) : object

Parameters

$header

array

(Required) Associative array of HTTP headers (typically returned by ).

$body

string

(Required) XML-formatted response from AWS.

$status

integer

(Optional) HTTP response status code from the request.

Returns

objectContains an `header` property (HTTP headers as an associative array), a or `body` property, and an `status` code.

Did we receive the status code we expected?

isOK(integer|array $codes = array(200, 201, 204, 206)) : boolean

Parameters

$codes

integerarray

(Optional) The status code(s) to expect. Pass an for a single acceptable value, or an of integers for multiple acceptable values.

Returns

booleanWhether we received the expected status code or not.

 Properties

 

Stores the SimpleXML response.

$body 

Default

 

Stores the HTTP header information.

$header 

Default

 

Stores the HTTP response code.

$status 

Default