\Think\Upload\Driver\BcsBCS_ResponseCore

Container for all response-related methods.

Summary

Methods
Properties
Constants
__construct()
isOK()
$header
$body
$status
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$header

$header : 

Stores the HTTP header information.

Type

$body

$body : 

Stores the SimpleXML response.

Type

$status

$status : 

Stores the HTTP response code.

Type

Methods

__construct()

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

Constructs a new instance of this class.

Parameters

array $header

(Required) Associative array of HTTP headers (typically returned by <BCS_RequestCore::get_response_header()>).

string $body

(Required) XML-formatted response from AWS.

integer $status

(Optional) HTTP response status code from the request.

Returns

object —

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

isOK()

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

Did we receive the status code we expected?

Parameters

integer|array $codes

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

Returns

boolean —

Whether we received the expected status code or not.