AdvertConfirmationManager
in package
uses
AdvertConfirmByKeyTrait
FinalYes
Confirms an advert by the key from the `BZ_ADVERT_ACTIVATION_REQUEST` e-mail ({@see AdvertConfirmByKeyTrait}).
Sits next to AdvertManager, which performs the column writes so that the cache is
bumped. Called from :Api:Bazaar:Advert:confirmByKey (internal bridge only, grant guest).
Table of Contents
Properties
- $advertManager : AdvertManager
- $advertService : AdvertService
- $categoryManager : CategoryManager
- $esDocumentSource : AdvertDocumentSource
- $esIndexer : EsEntityIndexer
- $rateLimit : RateLimit
- $rateLimitConfig : RateLimitConfig
Methods
- __construct() : mixed
- afterAdvertConfirmed() : void
- Applies the consequences of a confirmation: the ES document carries `confirmedAt` (fail-open, like `completedSave`), and with automatic confirmation off the category counts include only confirmed adverts.
- afterRecordConfirmed() : void
- confirmationKeyInvalidCode() : ResultCode
- findAdvertForConfirmation() : Advert|null
- Loads the advert fresh from the DB (`useCache = false`); a cached copy would let a consumed key be used again.
- findRecordForConfirmation() : Advert|Advert|null
- getConfirmModule() : string
- updateAdvertColumns() : Result
- updateConfirmationColumns() : Result
Properties
$advertManager read-only
private
AdvertManager
$advertManager
$advertService read-only
private
AdvertService
$advertService
$categoryManager read-only
private
CategoryManager
$categoryManager
$esDocumentSource read-only
private
AdvertDocumentSource
$esDocumentSource
$esIndexer read-only
private
EsEntityIndexer
$esIndexer
$rateLimit read-only
private
RateLimit
$rateLimit
$rateLimitConfig read-only
private
RateLimitConfig
$rateLimitConfig
Methods
__construct()
public
__construct(AdvertManager $advertManager, AdvertService $advertService, CategoryManager $categoryManager, EsEntityIndexer $esIndexer, AdvertDocumentSource $esDocumentSource, RateLimit $rateLimit, RateLimitConfig $rateLimitConfig) : mixed
Parameters
- $advertManager : AdvertManager
- $advertService : AdvertService
- $categoryManager : CategoryManager
- $esIndexer : EsEntityIndexer
- $esDocumentSource : AdvertDocumentSource
- $rateLimit : RateLimit
- $rateLimitConfig : RateLimitConfig
afterAdvertConfirmed()
Applies the consequences of a confirmation: the ES document carries `confirmedAt` (fail-open, like `completedSave`), and with automatic confirmation off the category counts include only confirmed adverts.
private
afterAdvertConfirmed(int $advertId) : void
Parameters
- $advertId : int
afterRecordConfirmed()
private
afterRecordConfirmed(int $id) : void
Parameters
- $id : int
confirmationKeyInvalidCode()
private
confirmationKeyInvalidCode() : ResultCode
Return values
ResultCodefindAdvertForConfirmation()
Loads the advert fresh from the DB (`useCache = false`); a cached copy would let a consumed key be used again.
private
findAdvertForConfirmation(int $advertId) : Advert|null
Parameters
- $advertId : int
Return values
Advert|nullfindRecordForConfirmation()
private
findRecordForConfirmation(int $id) : Advert|Advert|null
Parameters
- $id : int
Return values
Advert|Advert|nullgetConfirmModule()
private
getConfirmModule() : string
Return values
stringupdateAdvertColumns()
private
updateAdvertColumns(int $advertId, array<string, mixed> $values) : Result
Parameters
- $advertId : int
- $values : array<string, mixed>
Return values
ResultupdateConfirmationColumns()
private
updateConfirmationColumns(int $id, array<string, mixed> $values) : Result
Parameters
- $id : int
- $values : array<string, mixed>