The PHP SDK can be used to evaluate flags and report usage to the Tggl API or a proxy.
🔗 Website • 📚 Documentation • 📦 Packagist • 🎥 Videos
Install the dependency:
composer require tggl/clientStart 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') {
// ...
}