CRM_Cxn_CiviCxnHttp
extends PhpHttp
in package
Class CRM_Cxn_CiviCxnHttp
This extends the PhpHttp client used by CiviConnect and adds:
- Force-cache support for GET requests
- Compliance with SSL policy
Table of Contents
Properties
- $cache : CRM_Utils_Cache_Interface|null
- $singleton : mixed
Methods
- __construct() : mixed
- The cache data store.
- getCache() : CRM_Utils_Cache_Interface|null
- Get cache.
- send() : array<string|int, mixed>
- Send.
- singleton() : CRM_Cxn_CiviCxnHttp
- Singleton object.
- createStreamOpts() : array<string|int, mixed>
- Create stream options.
Properties
$cache
protected
CRM_Utils_Cache_Interface|null
$cache
$singleton
protected
static mixed
$singleton
= \NULL
Methods
__construct()
The cache data store.
public
__construct(CRM_Utils_Cache_Interface|null $cache) : mixed
Parameters
- $cache : CRM_Utils_Cache_Interface|null
getCache()
Get cache.
public
getCache() : CRM_Utils_Cache_Interface|null
Return values
CRM_Utils_Cache_Interface|nullsend()
Send.
public
send(string $verb, string $url, string $blob[, array<string|int, mixed> $headers = [] ]) : array<string|int, mixed>
Parameters
- $verb : string
- $url : string
- $blob : string
- $headers : array<string|int, mixed> = []
-
Array of headers (e.g. "Content-type" => "text/plain").
Return values
array<string|int, mixed> —array($headers, $blob, $code)
singleton()
Singleton object.
public
static singleton([bool $fresh = FALSE ]) : CRM_Cxn_CiviCxnHttp
Parameters
- $fresh : bool = FALSE
Tags
Return values
CRM_Cxn_CiviCxnHttpcreateStreamOpts()
Create stream options.
protected
createStreamOpts(string $verb, string $url, string $blob, array<string|int, mixed> $headers) : array<string|int, mixed>
Parameters
- $verb : string
- $url : string
- $blob : string
- $headers : array<string|int, mixed>