Skip to content

AllowListAnalyticsContextPolicy ​

Rasuvaeff\Yii3AbTesting\AllowListAnalyticsContextPolicy

Class · rasuvaeff/yii3-ab-testing · Source · implements AnalyticsContextPolicy

Explicitly allows context attributes, optionally renames output keys, and replaces selected values with a fixed marker.

Default construction allows nothing: an attribute reaches analytics only because someone listed it, never because it happened to be in the context.

Constants ​

REDACTED ​

php
REDACTED = '[redacted]'

Constructor ​

php
new AllowListAnalyticsContextPolicy(
    array $allowedAttributes = [],
    array $renamedAttributes = [],
    array $redactedAttributes = [],
)
  • $renamedAttributes — input name => stored name

Methods ​

apply() ​

php
apply(?AssignmentContext $context): array