CanonicalEventSerializer
Rasuvaeff\Yii3AbTesting\CanonicalEventSerializer
Class · rasuvaeff/yii3-ab-testing · Source · implements EventSerializer
The canonical schema v2 serializer.
Output is byte-reproducible for a given event: dimension keys are sorted, and absent optional values become the empty string rather than null so that every row has the same shape as the analytics table's column defaults.
Constants
SCHEMA_VERSION
php
SCHEMA_VERSION = 2Schema generation carried in every row so consumers can branch on it.
Methods
exposure()
php
exposure(ExposureEvent $event): arrayconversion()
php
conversion(ConversionEvent $event): array