FeatureRequester
in
Interface for the component that retrieves feature flag data.
Application code should not need to implement this interface. LaunchDarkly provides several implementations:
- The default, Guzzle::featureRequester(), which requests flags inefficiently via HTTP on demand.
- Database integrations provided in separate packages. See: https://docs.launchdarkly.com/sdk/features/storing-data#php
- A mechanism for reading data from the filesystem: Files
- A mechanism for injecting test data: TestData
Table of Contents
- getAllFeatures() : array<string, FeatureFlag>|null
- Gets all feature flags.
- getFeature() : FeatureFlag|null
- Gets the configuration for a specific feature flag.
- getSegment() : Segment|null
- Gets the configuration for a specific user segment.
Methods
getAllFeatures()
Gets all feature flags.
public
getAllFeatures() : array<string, FeatureFlag>|null
Return values
array<string, FeatureFlag>|null —The decoded FeatureFlags, or null if missing
getFeature()
Gets the configuration for a specific feature flag.
public
getFeature(string $key) : FeatureFlag|null
Parameters
- $key : string
-
feature key
Return values
FeatureFlag|null —The decoded FeatureFlag, or null if missing
getSegment()
Gets the configuration for a specific user segment.
public
getSegment(string $key) : Segment|null
Parameters
- $key : string
-
segment key
Return values
Segment|null —The decoded Segment, or null if missing