tggl/client

Tggl PHP client

Installs: 45 324

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/tggl/client

2.0.0 2024-12-17 13:16 UTC

This package is auto-updated.

Last update: 2025-09-24 14:39:30 UTC


README

Tggl Logo

Tggl PHP SDK

The PHP SDK can be used to evaluate flags and report usage to the Tggl API or a proxy.

🔗 Website • 📚 Documentation • 📦 Packagist • 🎥 Videos

Usage

Install the dependency:

composer require tggl/client

Start evaluating flags:

use Tggl\Client\TgglClient;
 
// Some class to represent your context
class Context {
  $userId;
  $email;
}
 
$client = new TgglClient('YOUR_API_KEY');
 
// An API call to Tggl is performed here
$flags = $client->evalContext(new Context());
 
if ($flags->get('my-feature', 'Variation A') === 'Variation A') {
  // ...
}