Skip to content

Extension points

tilttek/exchange
PointWhat an application givesWhere
Reservation\ReservationStore, Trade\OfferStore, Transfer\TransferLogThe storage of reservations, offers and transfers, in place of the stores in memoryWriting a store
TransactionThe unit that runs the steps of one exchange together, such as a database transactionWriting a store
Trade\InventoryThe members' items as the application's collections keep them: who owns an item, whether it may change hands, the moves of a tradeTrades
Reward\Catalog, Reward\WritableCatalogThe rewards offered for points, from a configuration or a catalogue the site editsRewards
Reward\RequirementsThe conditions of the rewards — badge:helper, level:5 — answered from the application's other packagesRewards
MemberSinceWhen a member joined, for the delay a new account waitsGuards
AnnouncerWhat is done with each Event\ExchangeEvent: a reward delivered, a member toldEvents
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.