LaunchDarkly PHP SDK DynamoDB integration 1.3.0

DynamoDb
in package

Table of Contents

featureRequester()  : Closure
Configures an adapter for reading feature flag data from DynamoDB.

Methods

featureRequester()

Configures an adapter for reading feature flag data from DynamoDB.

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

After calling this method, store its return value in the feature_requester property of your client configuration:

$fr = LaunchDarkly\Integrations\DynamoDb::featureRequester([ 'dynamodb_table' => 'my-table' ]);
$config = [ 'feature_requester' => $fr ];
$client = new LDClient('sdk_key', $config);

Or if you already have a client instance:

$dynamoClient = new Aws\DynamoDb\DynamoDbClient($settings);
$fr = LaunchDarkly\Integrations\DynamoDb::featureRequester([ 'dynamo_client' => $dynamoClient ]);
$config = [ 'feature_requester' => $fr ];
$client = new LDClient('sdk_key', $config);

For more about using LaunchDarkly with databases, see the SDK reference guide.

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

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

  • dynamodb_table: (required) name of an existing table in DynamoDB.
  • dynamodb_options: can include any settings supported by the AWS SDK client
  • dynamodb_prefix: a string to be prepended to all database keys; corresponds to the prefix setting in ld-relay
  • dynamodb_client: an already-configured DynamoDb client instance if you wish to reuse one; if specified, this will cause all other options except dynamodb_prefix and dynamodb_table to be ignored
  • apc_expiration: expiration time in seconds for local caching, if APCu is installed
Return values
Closure

an object to be stored in the feature_requester configuration property

Search results