You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository houses the PHP SDK for use with Optimizely Full Stack and Optimizely Rollouts.
8
+
This repository houses the PHP SDK for use with Optimizely Feature Experimentation and Optimizely Full Stack (legacy).
8
9
9
-
Optimizely Full Stack is A/B testing and feature flag management for product development teams. Experiment in any application. Make every feature on your roadmap an opportunity to learn. Learn more at https://www.optimizely.com/platform/full-stack/, or see the [documentation](https://docs.developers.optimizely.com/full-stack/docs).
10
+
Optimizely Feature Experimentation is an A/B testing and feature management tool for product development teams that enables you to experiment at every step. Using Optimizely Feature Experimentation allows for every feature on your roadmap to be an opportunity to discover hidden insights. Learn more at [Optimizely.com](https://www.optimizely.com/products/experiment/feature-experimentation/), or see the [developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome).
10
11
11
-
Optimizely Rollouts is free feature flags for development teams. Easily roll out and roll back features in any application without code deploys. Mitigate risk for every feature on your roadmap. Learn more at https://www.optimizely.com/rollouts/, or see the [documentation](https://docs.developers.optimizely.com/rollouts/docs).
12
+
Optimizely Rollouts is [free feature flags](https://www.optimizely.com/free-feature-flagging/) for development teams. You can easily roll out and roll back features in any application without code deploys, mitigating risk for every feature on your roadmap.
12
13
13
-
## Getting Started
14
+
## Get Started
14
15
15
-
### Installing the SDK
16
+
Refer to the [PHP SDK's developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/php-sdk) for detailed instructions on getting started with using the SDK.
17
+
18
+
### Requirements
19
+
20
+
To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely account executive.
21
+
22
+
### Install the SDK
16
23
17
24
The Optimizely PHP SDK can be installed through [Composer](https://getcomposer.org/). Please use the following command:
To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely account executive.
30
+
## Use the PHP SDK
25
31
26
-
### Using the SDK
32
+
### Initialization
27
33
28
-
#### Initialization
29
34
Create the Optimizely client, for example:
30
35
31
36
```php
32
37
$optimizely = new Optimizely(<<DATAFILE>>);
33
38
```
34
39
35
-
Or you may also use OptimizelyFactory method to create an optimizely client using your SDK key, an optional fallback datafile and an optional datafile access token. Using this method internally creates an HTTPProjectConfigManager. See [HTTPProjectConfigManager](#http_config_manager) for further detail.
40
+
Or you may also use OptimizelyFactory method to create an optimizely client using your SDK key, an optional fallback datafile and an optional datafile access token. Using this method internally creates an HTTPProjectConfigManager. See [HTTPProjectConfigManager](#use-httpprojectconfigmanager) for further detail.
is an implementation of `ProjectConfigManagerInterface` interface.
@@ -63,31 +68,53 @@ project datafile and initialize an instance of the ProjectConfig.
63
68
64
69
Calling `fetch` will update the internal ProjectConfig instance that will be returned by `getConfig`.
65
70
66
-
#####Use HTTPProjectConfigManager
71
+
### Use HTTPProjectConfigManager
67
72
68
73
```php
69
74
$configManager = new HTTPProjectConfigManager(<<SDK_KEY>>);
70
75
```
71
76
72
-
#####SDK key
77
+
### SDK key
73
78
Optimizely project SDK key; required unless source URL is overridden.
74
79
75
80
A notification will be triggered whenever a _new_ datafile is fetched and ProjectConfig is updated. To subscribe to these notifications, use the `$notificationCenter->addNotificationListener(NotificationType::OPTIMIZELY_CONFIG_UPDATE, $updateCallback)`.
76
81
77
-
#### Documentation
78
-
See the Optimizely Full Stack [developer documentation](https://developers.optimizely.com/x/solutions/sdks/reference/?language=php) to learn how to set up your first Full Stack project and use the SDK.
0 commit comments