Skip to content

AI_Index

Ahmed Abbas edited this page Mar 22, 2026 · 5 revisions

PHP SDK Wiki — AI Agent Index

This index helps AI agents find the right documentation page without reading the entire wiki. Read this file first, then load only the specific pages relevant to your task.

User Guide

Page When to read
User Guide SDK installation, configuration, API reference, method signatures
Data Model Reference Entity relationships: Experience, Variation, Change, Feature, Variable, Goal, Audience, Location

Core Modules

Page When to read
ConvertSDK / Core SDK initialization, lifecycle, top-level API (ConvertSDK::create(), Core->createContext())
Context Visitor context, running experiments/features, getting variations for a visitor
ExperienceManager A/B test selection, activation, variation assignment
FeatureManager Feature flag evaluation, variable values, feature status
DataManager Data access layer, project config, entity lookups, visitor persistence
BucketingManager Visitor bucketing algorithm, hash-based assignment, traffic allocation
RuleManager Rule evaluation: audience matching, location matching
ApiManager HTTP communication: config fetching, event tracking, queue management, PSR-18
EventManager Event system: pub/sub, deferred events, SystemEvents enum
SegmentsManager Segment evaluation, custom segments, default reporting segments
Config / Types PHP enums, readonly DTOs, configuration schema, PSR standards

Module Dependency Map

ConvertSDK::create()
  ├── creates → Core
  ├── auto-discovers → PSR-18 HTTP Client
  ├── wires → PSR-16 Cache as DataStore
  └── registers → shutdown handler for queue flush
Core
  ├── creates → Context
  ├── fetches config via → ApiManager
  ├── fires events via → EventManager
  └── uses → DataManager
Context
  ├── runs experiments via → ExperienceManager
  ├── runs features via → FeatureManager
  ├── accesses data via → DataManager
  ├── evaluates segments via → SegmentsManager
  └── releases queues via → ApiManager
DataManager
  ├── buckets via → BucketingManager
  ├── matches rules via → RuleManager
  ├── enqueues tracking via → ApiManager
  └── fires events via → EventManager

PHP-Specific Notes

Topic Key difference from JS SDK
Initialization ConvertSDK::create($config) — static factory, synchronous
HTTP PSR-18 client, auto-discovered via php-http/discovery
Caching PSR-16 cache serves dual purpose: config caching + visitor data persistence
Logging PSR-3 LoggerInterface
Queue flush register_shutdown_function — no setTimeout/timers
Return types Readonly DTOs (BucketedVariation, BucketedFeature) and backed enums
Data persistence PSR-16 cache automatically wired as DataStore (no DataStoreManager queue)

Clone this wiki locally