Skip to content

Extension points

tilttek/leaderboards
PointWhat an application givesWhere
Store\ScoreStore, Store\SnapshotStore, Store\AppearanceStore, Store\LeagueStoreThe storage of scores, snapshots, choices of appearance and leagues, in place of the stores in memoryWriting a store
Contract\ValkeyConnectionThe connection to Valkey of ValkeyScoreStore, when the client is none RawCommandConnection wrapsWriting a store
LeaderboardObserverWhat is done when a snapshot is taken: rewarding the first membersSnapshots
League\LeagueObserverWhat is done when a week is settled: congratulating the members who went upLeagues
Psr\Clock\ClockInterfaceThe clock the services read — the projection too, to leave out a gesture older than a window —: the system's in production, a fixed one in testsTesting
The secret of LeaderboardsThe secret the luck of the teams is drawn fromTeams and titles

The boards themselves are values: Boards::fromArray() reads them from a configuration, or the application builds them in code. Every point is passed to the constructor of the service that uses it; the services keep no state of their own between two calls.