PHP Class Postmark\PostmarkClientBase

ファイルを表示 Open project: wildbit/postmark-php Class Usage Examples

Public Properties

Property Type Description
$BASE_URL string You may modify this value to disable SSL support, but it is not recommended.
$VERIFY_SSL In some PHP configurations, SSL/TLS certificates cannot be verified. Rather than disabling SSL/TLS entirely in these circumstances, you may disable certificate verification. This is dramatically better than disabling connecting to the Postmark API without TLS, as it's still encrypted, but the risk is that if your connection has been compromised, your application could be subject to a Man-in-the-middle attack. However, this is still a better outcome than using no encryption at all. If possible, you should try to resolve your PHP install's certificate issues as outline here: https://github.com/wildbit/postmark-php/wiki/SSL%20Errors%20on%20Windows

Protected Properties

Property Type Description
$authorization_header
$authorization_token
$client GuzzleHttp\Client
$os
$timeout
$version

Public Methods

Method Description
setClient ( Client $client ) Provide a custom GuzzleHttp\Client to be used for HTTP requests

Protected Methods

Method Description
__construct ( $token, $header, $timeout = 30 )
getClient ( ) : Client Return the injected GuzzleHttp\Client or create a default instance
processRestRequest ( string $method = NULL, string $path = NULL, array $body = [] ) : object The base request method for all API access.

Method Details

__construct() protected method

protected __construct ( $token, $header, $timeout = 30 )

getClient() protected method

Return the injected GuzzleHttp\Client or create a default instance
protected getClient ( ) : Client
return GuzzleHttp\Client

processRestRequest() protected method

The base request method for all API access.
protected processRestRequest ( string $method = NULL, string $path = NULL, array $body = [] ) : object
$method string The request VERB to use (GET, POST, PUT, DELETE)
$path string The API path.
$body array The content to be used (either as the query, or the json post/put body)
return object

setClient() public method

Provide a custom GuzzleHttp\Client to be used for HTTP requests
See also: http://docs.guzzlephp.org/en/latest/ for a full list of configuration options The following options will be ignored: - http_errors - headers - query - json
public setClient ( Client $client )
$client GuzzleHttp\Client

Property Details

$BASE_URL public_oe static_oe property

You may modify this value to disable SSL support, but it is not recommended.
public static string $BASE_URL
return string

$VERIFY_SSL public_oe static_oe property

In some PHP configurations, SSL/TLS certificates cannot be verified. Rather than disabling SSL/TLS entirely in these circumstances, you may disable certificate verification. This is dramatically better than disabling connecting to the Postmark API without TLS, as it's still encrypted, but the risk is that if your connection has been compromised, your application could be subject to a Man-in-the-middle attack. However, this is still a better outcome than using no encryption at all. If possible, you should try to resolve your PHP install's certificate issues as outline here: https://github.com/wildbit/postmark-php/wiki/SSL%20Errors%20on%20Windows
public static $VERIFY_SSL

$authorization_header protected_oe property

protected $authorization_header

$authorization_token protected_oe property

protected $authorization_token

$client protected_oe property

protected Client,GuzzleHttp $client
return GuzzleHttp\Client

$os protected_oe property

protected $os

$timeout protected_oe property

protected $timeout

$version protected_oe property

protected $version