mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
chore: PHP SDK example fix (#8146)
This commit is contained in:
parent
f76f754eca
commit
212203f7c7
@ -62,11 +62,14 @@ end`,
|
|||||||
|
|
||||||
use Unleash\\Client\\UnleashBuilder;
|
use Unleash\\Client\\UnleashBuilder;
|
||||||
|
|
||||||
|
require 'vendor/autoload.php';
|
||||||
|
|
||||||
$unleash = UnleashBuilder::create()
|
$unleash = UnleashBuilder::create()
|
||||||
->withAppName('unleash-onboarding-php')
|
->withAppName('unleash-onboarding-php')
|
||||||
->withAppUrl('<YOUR_API_URL>')
|
->withAppUrl('<YOUR_API_URL>')
|
||||||
->withHeader('Authorization', '<YOUR_API_TOKEN>')
|
->withHeader('Authorization', '<YOUR_API_TOKEN>')
|
||||||
->withInstanceId('unleash-onboarding-instance')
|
->withInstanceId('unleash-onboarding-instance')
|
||||||
|
->withMetricsInterval(5000)
|
||||||
->build();`,
|
->build();`,
|
||||||
Rust: `let client = client::ClientBuilder::default()
|
Rust: `let client = client::ClientBuilder::default()
|
||||||
.interval(500)
|
.interval(500)
|
||||||
@ -203,7 +206,11 @@ export const checkFlagCodeSnippets: Record<SdkName, string> = {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
`,
|
`,
|
||||||
Ruby: ``,
|
Ruby: ``,
|
||||||
PHP: ``,
|
PHP: `while (true) {
|
||||||
|
echo 'Feature flag is: ' . $unleash->isEnabled('<YOUR_FLAG>') . PHP_EOL;
|
||||||
|
sleep(1);
|
||||||
|
}
|
||||||
|
`,
|
||||||
Rust: ``,
|
Rust: ``,
|
||||||
'.NET': ``,
|
'.NET': ``,
|
||||||
Java: ``,
|
Java: ``,
|
||||||
|
Loading…
Reference in New Issue
Block a user