API reference
Every type marked @api in the five packages, reflected from src/ on each build. Types marked @internal are not part of the contract and are not listed.
Core
rasuvaeff/yii3-ab-testing — Rasuvaeff\Yii3AbTesting
| Type | Kind | Summary |
|---|---|---|
AbTesting | class | Entry point: resolves subjects into variants and turns those decisions into analytics events. |
AllowListAnalyticsContextPolicy | class | Explicitly allows context attributes, optionally renames output keys, and replaces selected values with a fixed marker. |
AnalyticsContextPolicy | interface | Selects which context attributes are safe to persist as event dimensions. |
AndTargetingRule | class | |
Assignment | class | The outcome of resolving a subject into a variant. |
AssignmentContext | class | |
AssignmentReceipt | class | Proof of an exposure, small enough to travel in a cookie or session so a conversion in a later request can be… |
AssignmentResolver | interface | |
AssignmentSource | enum | Where the served variant came from — the provenance axis, orthogonal to DecisionReason. |
AssignmentStore | interface | Persists an assigned variant per (experiment, subject) so a subject keeps the same variant even when experiment… |
AssignmentStrategy | interface | |
AttributeTargetingRule | class | |
AttributionWindow | class | How long after an exposure a conversion still counts for it. |
BuiltInTargetingRuleCodec | class | |
CanonicalEventSerializer | class | The canonical schema v2 serializer. |
CompositeConversionTracker | class | Fans a single conversion out to several ConversionTracker sinks in order. |
CompositeExposureTracker | class | Fans a single exposure out to several ExposureTracker sinks in order. |
ConfigExperimentProvider | class | |
ConfigurationAwareAssignmentStore | interface | Optional extension for stores that invalidate a sticky variant when the experiment configuration changes. |
ConversionEvent | class | A subject completed a goal. |
ConversionTracker | interface | Receives conversions for delivery to analytics storage. |
DecisionReason | enum | Why this variant was served instead of the deterministic hash bucket. |
DeduplicatingExposureTracker | class | Suppresses repeated exposures within its lifetime. |
EnvironmentTargetingRule | class | |
EventIdGenerator | interface | Mints the identity of an analytics event. |
EventSerializer | interface | Turns an event into the canonical flat row of analytics schema v2. |
InvalidExperimentException | class | |
InvalidVariantException | class | |
Experiment | class | |
ExperimentProvider | interface | |
ExperimentRegistry | class | Lazy view over an ExperimentProvider: the provider is queried on first access, then the set is memoized for the… |
ExposureEvent | class | A subject was shown a variant. |
ExposureTracker | interface | Receives exposures for delivery to analytics storage. |
FlushableTracker | interface | Contract for trackers that buffer events in memory and write them out in batches. |
LoggerConversionTracker | class | Writes each conversion as one structured PSR-3 record whose context is the canonical schema v2 row. |
LoggerExposureTracker | class | Writes each exposure as one structured PSR-3 record whose context is the canonical schema v2 row. |
NullConversionTracker | class | Discards conversions. |
NullExposureTracker | class | Discards exposures. |
OrTargetingRule | class | |
RamseyUuidEventIdGenerator | class | UUIDv7 from ramsey/uuid, for applications already standardised on it. |
RepeatedConversionPolicy | enum | How a report treats a subject converting on the same goal more than once. |
SymfonyUidEventIdGenerator | class | UUIDv7 from symfony/uid, for applications already standardised on it. |
SystemClock | class | Wall-clock time in UTC. |
TargetingRule | interface | |
TargetingRuleCodec | interface | |
TargetingRuleCodecRegistry | class | |
Uuid7EventIdGenerator | class | Default generator: UUIDv7 as specified by RFC 9562, with no dependency beyond the core so composer require alone… |
WeightedHashAssignmentStrategy | class | Deterministic weighted assignment: sha256(salt . |
Database
rasuvaeff/yii3-ab-testing-db — Rasuvaeff\Yii3AbTestingDb
| Type | Kind | Summary |
|---|---|---|
AbAssignmentsTableName | class | The sticky-assignment table's name, as a type. |
AbExperimentsTableName | class | The table's name, as a type. |
CachedExperimentProvider | class | |
CreateExperimentCommand | class | |
DisableExperimentCommand | class | |
EnableExperimentCommand | class | |
ListExperimentsCommand | class | |
ReweightExperimentCommand | class | |
ValidateExperimentsCommand | class | |
DbAssignmentStore | class | Server-side sticky assignments: one row per (experiment, subject). |
DbExperimentProvider | class | |
DbExperimentRepository | class | DB-backed operational repository with optimistic revision checks. |
ExperimentAlreadyExistsException | class | |
ExperimentNotFoundException | class | |
InvalidExperimentRowException | class | |
RevisionConflictException | class | |
ExperimentCacheInvalidator | interface | |
ExperimentRecord | class | Persisted operational metadata alongside the runtime experiment projection. |
ExperimentRepository | interface | Operational write-side for experiment definitions. |
ExperimentSchedule | class | When an experiment is meant to run, as an operational fact. |
ExperimentState | enum | Operational lifecycle state. |
LastKnownGoodExperimentProvider | class | Serves the last successfully read experiment set when the source fails. |
M260610000000CreateAbExperimentsTable | class | Creates the experiments table read by \Rasuvaeff\Yii3AbTestingDb\DbExperimentProvider. |
M260619000001AddTargetingToAbExperiments | class | Adds optional targeting column to the experiments table. |
M260731000000AddOperationalFieldsToAbExperiments | class | Adds the R1 operational control-plane fields without changing assignment data. |
M260801000000CreateAbAssignmentsTable | class | Creates the server-side sticky assignment table. |
M260801000001AddScheduleToAbExperiments | class | Adds the planned run window to the operational model. |
Web
rasuvaeff/yii3-ab-testing-web — Rasuvaeff\Yii3AbTestingWeb
| Type | Kind | Summary |
|---|---|---|
AllowAllConsentPolicy | class | Backward-compatible policy for applications where consent is not required or has already been enforced before the A/B… |
AnonymousToAuthenticatedStrategy | enum | Controls identity and sticky-assignment handling when an anonymous visitor becomes authenticated. |
CallbackConsentPolicy | class | Adapts an application consent callback to ConsentPolicyInterface. |
ConsentPolicyInterface | interface | Decides whether A/B testing may use persistent browser identifiers for a request. |
CookieAssignmentStore | class | Sticky-variant store backed by one bounded signed cookie. |
HexSubjectIdGenerator | class | Default generator: 32 lowercase hex characters over 128 random bits — the format ab_id cookies have always used, so it… |
SignedReceiptCodec | class | Encodes an AssignmentReceipt into a signed, transport-independent string, and decodes it back only if the signature… |
StickyAssignmentMiddleware | class | Creates the request-scoped signed-cookie store and sticky resolver, exposes both through… |
StickyAssignmentRequestAccessor | class | Typed access to the request-scoped sticky resolver and cookie store. |
StickyAssignmentResolver | class | Resolves an assignment with stickiness: a previously stored variant wins over a fresh deterministic assignment, so a… |
SubjectId | class | Typed subject identity carried through a PSR-7 request. |
SubjectIdGeneratorInterface | interface | Produces the subject id used for A/B assignment — and validates it coming back from the cookie. |
SubjectIdMiddleware | class | Establishes a stable subject id for A/B assignment and exposes it as a request attribute. |
SubjectIdRequestAccessor | class | Reads and writes the typed subject id without scattering request attribute keys through application code. |
SubjectIdSource | enum |
Outbox
rasuvaeff/yii3-ab-testing-outbox — Rasuvaeff\Yii3AbTestingOutbox
| Type | Kind | Summary |
|---|---|---|
AbTestingClickHouseRoutes | class | Route map for yii3-outbox-clickhouse, targeting the canonical schema v2. |
AbTestingOutboxEventType | enum | Stable outbox message types for A/B testing events. |
AbTestingOutboxMessageFactoryInterface | interface | Turns a core event into a stable outbox payload. |
AbTestingOutboxPayload | class | Transport description produced by the message factory before it is handed to \Rasuvaeff\Yii3Outbox\Outbox::record():… |
AggregateIdStrategyInterface | interface | Builds diagnostic outbox aggregate ids independently from analytics payloads. |
DefaultAbTestingOutboxMessageFactory | class | Serializes a core event into an outbox message. |
OutboxConversionTracker | class | Records each conversion as a durable outbox message via Outbox::record(). |
OutboxExposureTracker | class | Records each exposure as a durable outbox message via Outbox::record(). |
PseudonymousAggregateIdStrategy | class | Deterministic aggregate ids that never contain the raw subject id. |
ClickHouse
rasuvaeff/yii3-ab-testing-clickhouse — Rasuvaeff\Yii3AbTestingClickHouse
| Type | Kind | Summary |
|---|---|---|
AnalyticsSchemaV2 | class | The canonical analytics schema, as a contract other packages can check against. |
SchemaMigrations | class | Applies the schema this package owns. |