PHP SDK

Install

The package is not on Packagist yet. Add it from this repository:

{
  "repositories": [
    { "type": "path", "url": "../plugie-insights/sdk/php" }
  ],
  "require": {
    "plugie/insights-sdk": "*"
  }
}
composer require plugie/insights-sdk

(Swap path for vcs with a Git URL once the SDK has its own repository. Nothing about usage changes.)

Distributing on WordPress.org. Two plugins on one site each bundling this package will collide on class names unless the namespace is prefixed. Use Strauss or PHP-Scoper in your build. The SDK is written for this: everything it stores and every hook tag it registers is scoped by plugin id, not by class name, so two prefixed copies on one site do not share an option row, a cron event or a lock.