PHP Class BCS_ResponseCore

Afficher le fichier Open project: zblogcn/zblogphp

Méthodes publiques

Свойство Type Description
$body Stores the SimpleXML response.
$header Stores the HTTP header information.
$status Stores the HTTP response code.

Méthodes publiques

Méthode Description
__construct ( array $header, string $body, integer $status = null ) : object Constructs a new instance of this class.
isOK ( integer | array $codes = [200, 201, 204, 206] ) : boolean Did we receive the status code we expected?

Method Details

__construct() public méthode

Constructs a new instance of this class.
public __construct ( array $header, string $body, integer $status = null ) : object
$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.
Résultat object Contains an `header` property (HTTP headers as an associative array), a or `body` property, and an `status` code.

isOK() public méthode

Did we receive the status code we expected?
public isOK ( integer | array $codes = [200, 201, 204, 206] ) : boolean
$codes integer | array (Optional) The status code(s) to expect. Pass an for a single acceptable value, or an of integers for multiple acceptable values.
Résultat boolean Whether we received the expected status code or not.

Property Details

$body public_oe property

Stores the SimpleXML response.
public $body

$header public_oe property

Stores the HTTP header information.
public $header

$status public_oe property

Stores the HTTP response code.
public $status