Skip to content

ExperimentRegistry ​

Rasuvaeff\Yii3AbTesting\ExperimentRegistry

Class · rasuvaeff/yii3-ab-testing · Source

Lazy view over an ExperimentProvider: the provider is queried on first access, then the set is memoized for the registry's lifetime. reset() drops the memo so long-running runtimes (RoadRunner, Swoole) can re-read the provider per request — otherwise a kill switch flipped in the source would not take effect until the worker restarts.

Constructor ​

php
new ExperimentRegistry(ExperimentProvider $provider)

Methods ​

get() ​

php
get(string $name): Experiment

has() ​

php
has(string $name): bool

all() ​

php
all(): array

reset() ​

php
reset(): void