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
Copy file name to clipboardExpand all lines: README.md
+15-4
Original file line number
Diff line number
Diff line change
@@ -28,21 +28,32 @@ To access the Feature Management configuration in the Optimizely dashboard, plea
28
28
#### Initialization
29
29
Create the Optimizely client, for example:
30
30
31
-
```
31
+
```php
32
32
$optimizely = new Optimizely(<<DATAFILE>>);
33
33
```
34
34
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 HTTPProjectConfigManager. See [HTTPProjectConfigManager](#http_config_manager) for further detail.
Or you can also provide an implementation of the [`ProjectConfigManagerInterface`](https://github.com/optimizely/php-sdk/blob/master/src/Optimizely/ProjectConfigManager/ProjectConfigManagerInterface.php) in the constructor:
47
+
48
+
```php
38
49
$configManager = new HTTPProjectConfigManager(<<SDK_KEY>>);
39
50
$optimizely = new Optimizely(<<DATAFILE>>, null, null, null, false, null, $configManager);
40
51
```
41
52
42
53
#### ProjectConfigManagerInterface
43
54
[`ProjectConfigManagerInterface`](https://github.com/optimizely/php-sdk/blob/master/src/Optimizely/ProjectConfigManager/ProjectConfigManagerInterface.php) exposes `getConfig` method for retrieving `ProjectConfig` instance.
0 commit comments