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
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.
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:
55
72
56
73
```php
74
+
<?php
75
+
76
+
use Optimizely\Optimizely;
77
+
use Optimizely\ProjectConfigManager\HTTPProjectConfigManager;
78
+
57
79
$configManager = new HTTPProjectConfigManager(<<SDK_KEY>>);
58
-
$optimizely = new Optimizely(<<DATAFILE>>, null, null, null, false, null, $configManager);
80
+
$optimizely = new Optimizely(
81
+
<<DATAFILE>>,
82
+
null,
83
+
null,
84
+
null,
85
+
false,
86
+
null,
87
+
$configManager
88
+
);
59
89
```
60
90
61
91
### ProjectConfigManagerInterface
@@ -74,6 +104,10 @@ Calling `fetch` will update the internal ProjectConfig instance that will be ret
74
104
### Use HTTPProjectConfigManager
75
105
76
106
```php
107
+
<?php
108
+
109
+
use Optimizely\ProjectConfigManager\HTTPProjectConfigManager;
110
+
77
111
$configManager = new HTTPProjectConfigManager(<<SDK_KEY>>);
0 commit comments