1. Go to this page and download the library: Download taplytics/taplytics-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
taplytics / taplytics-php example snippets
$client = new TaplyticsLib\TaplyticsClient();
$client = $client->getClient();
function createGetVariables(
$token,
$userId,
$body = null)
function createGetFeatureFlags(
$token,
$userId,
$body = null)
$token = 'token';
$userId = 'user_id';
$body = new Body();
$result = $client->createGetFeatureFlags($token, $userId, $body);
foreach($result as $flagObj) {
// $flagObj->name to get the name of the feature flag
// $flagObj->keyName to get the key of the feature flag
}
function isFeatureFlagEnabled(
$token,
$userId,
$keyName,
$body = null)