Curl
in package
Integration with the curl HTTP client.
Tags
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 executingcurl; defaults to/usr/bin/env curl -
payload_temp_dir: directory for the temporary file that holds the event payload. Usetruefor the system temporary directory, or a path to name a directory. On Unix the default is to pass the payload on thecurlcommand line instead of writing a file. Set this option if a payload can be larger than the maximum argument length of the platform, which makesescapeshellarg()fail withArgument exceeds the allowed length of N bytes. On Windows the payload always goes into a file, and this option only names the directory; the default there is the system temporary directory.
-
Return values
mixed —an object to be stored in the event_publisher configuration property