final class DbUserAgreementRepository implements UserAgreementRepositoryInterface (View source)

SQL persistence for accepted user agreement versions in the user_agreements table.

Methods

__construct(PDO $db, ConfigurationInterface $config)

No description

bool
hasUserAcceptedAgreement(int $userId, string $version)

No description

bool
recordAcceptance(int $userId, string $version, string $ipAddress, string $userAgent)

Stores the acceptance, or refreshes it when the user already accepted this version.

array
getUserAgreements(int $userId)

The user's acceptances, newest first.

array
getAllAgreements()

No description

Details

__construct(PDO $db, ConfigurationInterface $config)

No description

Parameters

PDO $db
ConfigurationInterface $config

bool hasUserAcceptedAgreement(int $userId, string $version)

No description

Parameters

int $userId
string $version

Return Value

bool

bool recordAcceptance(int $userId, string $version, string $ipAddress, string $userAgent)

Stores the acceptance, or refreshes it when the user already accepted this version.

Parameters

int $userId
string $version
string $ipAddress
string $userAgent

Return Value

bool

array getUserAgreements(int $userId)

The user's acceptances, newest first.

Parameters

int $userId

Return Value

array

array getAllAgreements()

No description

Return Value

array