Skip to content

Extension points

tilttek/badges
PointWhat an application givesWhere
Store\AwardStore, Store\ProgressStore, Store\ProfileStore, Store\GrantStoreThe storage of awards, progress, profiles and consents, in place of the stores in memoryWriting a store
MeasuresThe values the Measure criteria read — a balance of points, a level — from the application's other packagesBadges and criteria
Criterion\Criterion, Criterion\LeafA criterion of its own, built in code beside the built-in onesBadges and criteria
AwardObserverWhat is done when a member earns or loses a badge: a notification, a rewardAwarding
ShareChannelWhere a member shares an achievement, when they ask for itWhat a member shows
Psr\Clock\ClockInterfaceThe clock the services read: the system's in production, a fixed one in testsTesting

Every point is passed to the constructor of the service that uses it; the services keep no state of their own between two calls.