vwo/vwo-fme-php-sdk

VWO server side sdk

1.3.0 2024-10-03 09:39 UTC

This package is auto-updated.

Last update: 2024-11-04 08:16:02 UTC


README

Latest Stable Version CI Coverage StatusLicense

Requirements

PHP >= 7.4

Installation

Install the latest version with

composer require vwo/vwo-fme-php-sdk

Basic Usage

$vwoClient = VWO::init([
  'sdkKey' => 'vwo_sdk_key',
  'accountId' => 'vwo_account_id',
]);

// set user context
$userContext = [ 'id' => 'unique_user_id'];

// returns a flag object
$getFlag = $vwoClient->getFlag('feature_key', $userContext);

// check if flag is enabled
$isFlagEnabled = $getFlag['isEnabled'];

// get variable
$variableValue = $getFlag->getVariable('variable_key', 'default-value');

// track event
$trackRes = $vwoClient->trackEvent('event_name', $userContext);

// set Attribute
$setAttribute = $vwoClient->setAttribute('attribute_key', 'attribute_value', $userContext);

Changelog

Refer CHANGELOG.md

Development and Test Cases

  1. Set development environment
composer run-script start
  1. Run test cases
composer run-script test

Contributing

Please go through our contributing guidelines

Code of Conduct

Code of Conduct

License

Apache License, Version 2.0

Copyright 2024 Wingify Software Pvt. Ltd.