Skip to content

StickyAssignmentRequestAccessor ​

Rasuvaeff\Yii3AbTestingWeb\StickyAssignmentRequestAccessor

Class · rasuvaeff/yii3-ab-testing-web · Source

Typed access to the request-scoped sticky resolver and cookie store.

Constructor ​

php
new StickyAssignmentRequestAccessor(
    string $resolverAttribute = 'ab.assignmentResolver',
    string $storeAttribute = 'ab.assignmentStore',
)

Methods ​

resolver() ​

php
resolver(Psr\Http\Message\ServerRequestInterface $request): AssignmentResolver

store() ​

php
store(Psr\Http\Message\ServerRequestInterface $request): CookieAssignmentStore

with() ​

php
with(
    Psr\Http\Message\ServerRequestInterface $request,
    AssignmentResolver $resolver,
    CookieAssignmentStore $store,
): Psr\Http\Message\ServerRequestInterface