Skip to content

Extension points

tilttek/points
PointWhat an application givesWhere
Ledger\LedgerThe storage of the ledger, in place of InMemoryLedgerWriting a ledger
Psr\Clock\ClockInterfaceThe clock that stamps each movement and decides expiry: the system's in production, a fixed one in testsTesting

The currencies and the earning rules are values: Currencies::fromArray() and Rules::fromArray() read 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.