LaunchDarkly PHP SDK 4.2.3

Curl
in package

Integration with the curl HTTP client.

Tags
since
3.5.0

Table of Contents

eventPublisher()  : mixed
Configures an adapter for sending analytics events to LaunchDarkly using curl.

Methods

eventPublisher()

Configures an adapter for sending analytics events to LaunchDarkly using curl.

public static eventPublisher([array<string|int, mixed> $options = [] ]) : mixed

This is the default mechanism if you do not specify otherwise, so you should not need to call this method explicitly; the options can be set in the main client configuration. However, if you do choose to call this method, store its return value in the event_publisher property of the client configuration.

$ep = LaunchDarkly\Integrations\Curl::eventPublisher();
$config = [ "event_publisher" => $ep ];
$client = new LDClient("sdk_key", $config);

This implementation forks a process for each event payload. Alternatively, you can use Guzzle::eventPublisher(), which makes synchronous requests.

Parameters
$options : array<string|int, mixed> = []

Configuration settings (can also be passed in the main client configuration):

  • curl: command for executing curl; defaults to /usr/bin/env curl
Return values
mixed

an object to be stored in the event_publisher configuration property

Search results