Official PHP SDK for integrating WordPress, Craft, Statamic, ExpressionEngine, and other PHP plugin ecosystems or frameworks with the Burrow platform.
Burrow helps plugin teams turn product activity into reliable, structured signals that power onboarding visibility, operational automation, and product analytics.
With Burrow, plugins can:
- discover and link tenant/project context
- publish canonical events across forms, ecommerce, and system channels
- keep historical backfills aligned with real source timestamps
- route data safely with scoped ingestion keys and project guards
- use retry + outbox primitives for durable delivery
This SDK provides a framework-agnostic integration layer so plugin code can stay focused on CMS specifics while Burrow concerns stay centralized:
- typed client for onboarding, contracts, events, and backfill APIs
- canonical event envelope builders and validation helpers
- retry-aware transport and normalized API error classification
- in-memory and SQL outbox building blocks for resilient event dispatch
composer require useburrow/sdk-php- PHP 8.2+
use Burrow\Sdk\Client\BurrowClient;
use Burrow\Sdk\Transport\CurlHttpTransport;
use Burrow\Sdk\Transport\RetryPolicy;
$transport = new CurlHttpTransport(
timeoutSeconds: 8,
retryPolicy: new RetryPolicy(maxAttempts: 3, baseDelayMilliseconds: 200)
);
$client = new BurrowClient(
baseUrl: 'https://app.useburrow.com',
apiKey: 'your-plugin-api-key',
transport: $transport
);- Call onboarding discover/link during plugin setup.
- Submit/fetch forms contracts and persist mapping metadata.
- Publish real-time canonical events as plugin activity occurs.
- Run historical backfill after contract setup is finalized.
- Use outbox delivery for idempotent retries and outage resilience.
use Burrow\Sdk\Events\EventEnvelopeBuilder;
$event = EventEnvelopeBuilder::build([
'organizationId' => 'org_123',
'clientId' => 'cli_123',
'channel' => 'forms',
'event' => 'forms.submission.received',
'timestamp' => gmdate('c'),
'properties' => ['submissionId' => 'sub_123'],
'tags' => ['formId' => 'contact'],
]);
$client->publishEvent($event);composer install
composer testMIT. See LICENSE.