1
0
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:
Jaanus Sellin 2024-09-16 14:29:03 +03:00 committed by GitHub
parent f76f754eca
commit 212203f7c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: ``,