Overview
  • Package
  • Class

Packages

  • Klarna
    • Checkout
  • Payment
    • Klarna
      • HTTP
      • Interfaces
      • Unit
        • Tests

Classes

  • Klarna_Checkout_HTTP_CURLHandle
  • Klarna_Checkout_HTTP_CURLHeaders
  • Klarna_Checkout_HTTP_CURLTransport
  • Klarna_Checkout_HTTP_Request
  • Klarna_Checkout_HTTP_Response

Interfaces

  • Klarna_Checkout_HTTP_CURLHandleInterface

Class Klarna_Checkout_HTTP_Response

Klarna HTTP Response class

Package: Payment\Klarna\HTTP
Category: Payment
Copyright: 2015 Klarna AB
License: Apache license v2.0
Author: Klarna support@klarna.com
Link: http://developers.klarna.com/
Located at Klarna/Checkout/HTTP/Response.php

Methods summary

public
# __construct( Klarna_Checkout_HTTP_Request $request, array $headers, integer $status, string $data )

Initializes a new instance of the HTTP response class.

Initializes a new instance of the HTTP response class.

Parameters

$request
the origin request.
$headers
the response HTTP headers.
$status
the HTTP status code.
$data
the response payload.
public integer
# getStatus( )

Gets the HTTP status code.

Gets the HTTP status code.

Returns

integer
HTTP status code.
public Klarna_Checkout_HTTP_Request
# getRequest( )

Gets the HTTP request this response originated from.

Gets the HTTP request this response originated from.

Returns

Klarna_Checkout_HTTP_Request
public string|null
# getHeader( string $name )

Gets specified HTTP header.

Gets specified HTTP header.

Parameters

$name
the header name.

Returns

string|null
Null if header doesn't exist, else header value.

Throws

InvalidArgumentException

If the specified argument is not of type string.

public array
# getHeaders( )

Gets the headers specified for the response.

Gets the headers specified for the response.

Returns

array
public string
# getData( )

Gets the data (payload) for the response.

Gets the data (payload) for the response.

Returns

string
the response payload.

Magic methods summary

Properties summary

protected integer $status

HTTP response status code

HTTP response status code

#
protected Klarna_Checkout_HTTP_Request $request

Request object

Request object

#
protected array $headers

HTTP header

HTTP header

#
protected string $data

Data

Data

#
API documentation generated by ApiGen