Installation
tilttek/character-retirementcomposer require tilttek/character-retirement
The package needs PHP 8.5 or later, and tilttek/character-sheet 0.1.
An application gives CharacterEndings:
- a
Contract\EndingStoreInterfacethat keeps the endings in its database; - the
CharacterSheetsservice oftilttek/character-sheet, which reads and computes the sheets; - a
Contract\EndingObserverInterface, to send its messages, or nothing.
The service keeps no state between calls, so one instance serves every request of a long-running worker.
The calls that date an ending or a return take the moment as a DateTimeImmutable: the application reads it from its
clock, or takes the date the table gives.
Store\InMemoryEndingStore keeps the endings in memory, for tests.