Skip to content

Commit 962f091

Browse files
committed
docs: Add steps for sdk key init
1 parent 0be9ae0 commit 962f091

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,17 @@ Create the Optimizely client, for example:
3232
$optimizely = new Optimizely(<<DATAFILE>>);
3333
```
3434

35-
You can also provide an implementation of the `ProjectConfigManagerInterface` in the constructor:
35+
Or you may also use OptimizelyFactory method to create an optimizely client using your SDK key and an optional fallback datafile. Using this method internally creates an HTTProjectConfigManager. See HTTProjectConfigManager for further detail.
36+
37+
```
38+
$optimizelyClient = OptimizelyFactory::createDefaultInstance("your-sdk-key", <<DATAFILE>>);
39+
```
40+
// access your HTTP project config manager
41+
```
42+
$configManager = $optimizelyClient->configManager;
43+
```
44+
45+
Or you can also provide an implementation of the `ProjectConfigManagerInterface` in the constructor:
3646

3747
```
3848
$configManager = new HTTPProjectConfigManager(<<SDK_KEY>>);

0 commit comments

Comments
 (0)