Skip to content

Extension points

tilttek/writing-goals
PointWhat an application givesWhere
Contract\GoalStore, Contract\LogStoreThe storage of goals and counts, in place of the stores in memoryWriting a store
Psr\EventDispatcher\EventDispatcherInterfaceThe dispatcher GoalReached goes through, to a listener that awards a badge or starts a celebrationLogging
Psr\Clock\ClockInterfaceThe clock the author's today is read from: the system's in production, a fixed one in testsTesting

Every point is passed to the constructor of WritingGoals, which keeps no state of its own between two calls. Planner needs none of them.

The public types and the store contracts are stable within a minor version of 0.x; a change to them comes with a new minor version and a line in the changelog.