\SofortLibHttp
Encapsulates communication via HTTP
requires libcurl and openssl
- Author: SOFORT AG (integration@sofort.com)
- Copyright: 2010-2014 SOFORT AG
- License: Released under the GNU LESSER GENERAL PUBLIC LICENSE (Version 3)
Synopsis
class SofortLibHttp
{
- // members
- public bool $compression;
- public $connectionMethod;
- public $error;
- public $headers;
- public integer $httpStatus = 200;
- public $info;
- public $proxy;
- public $url;
- protected string $_apiKey = '';
- protected string $_configKey = '';
- protected string $_projectId = '';
- protected string $_response = '';
- protected string $_userId = '';
- // methods
- public SofortLibHttp __construct()
- public array(code getHttpCode()
- public string getHttpStatusCode()
- public string getHttpStatusMessage()
- public string getInfo()
- public void setConfigKey()
- public void setHeaders()
- protected string _xmlError()
Members
protected
- $_apiKey
—
string
Api Key as provided in User Account on sofort.com - $_configKey
—
string
Complete Config Key as provided in User Account on sofort.com - $_projectId
—
string
Project ID from sofort.com - $_response
—
string
Provides the parsed response. - $_userId
—
string
User ID from sofort.com
public
- $compression
—
bool
Compression on/off? - $connectionMethod
—
string
Method to be used - $error
—
array
Error Code and Description - $headers
—
array
Headers to be sent - $httpStatus
—
int
HTTP-Status Code - $info
—
mixed
Information for the last transfer - $proxy
—
string
Proxy to be used - $url
—
string
API-url
Methods
protected
- _xmlError() — Output an xml error
public
- __construct() — Constructor for SofortLibHttp
- getHttpCode() — HTTP error handling
- getHttpStatusCode() — Getter for HTTP status code
- getHttpStatusMessage() — Getter for HTTP status message
- getInfo() — Getter for information
- setConfigKey() — Setter for ConfigKey and parsing ConfigKey into userId, ProjectId, apiKey
- setHeaders() — Setting Headers to be sent