Skip to main content

Gravity_Forms\Gravity_Forms\External_API\GF_API_Connector

Class GF_API_Connector

An abstraction allowing us to create codified API Connector classes with a distinct strategy for each one, and a standardized Cache mechanism. This separates the actually communication logic from the class which calls it, allowing better testability.

Since: 2.5

Source: includes/external-api/class-gf-api-connector.php:16

Details

  • Kind: class
  • Namespace: Gravity_Forms\Gravity_Forms\External_API

Properties

PropertyTypeDescription
$cache\GFCache

Methods

MethodDescription
__construct()GF_API_Connector constructor.

Method Reference

__construct()

public function __construct( $strategy, $cache )

GF_API_Connector constructor.

Parameters

NameTypeDefaultDescription
$strategyThe strategy class used to actually communicate with the API.
$cacheThe cache class used for caching results and other operations.

Source: includes/external-api/class-gf-api-connector.php:31