Skip to content
Corex

PrunableStore

Corex\Config\Retention\PrunableStore · interface · Config layer

One data store that participates in the unified retention sweep (spec 068 T202): activity events, captured email, consent records, export logs, and the like. Each reports a stable key + human label, its configured retention window in days (0 = keep forever), and prunes rows older than a cutoff, returning how many were removed. Keeping this a small seam lets the sweep stay pure and unit-testable while each real store owns its own storage.

The retention window in days; 0 means “keep forever” (never pruned by the sweep).

pruneOlderThan(DateTimeImmutable $cutoff): int

Section titled “pruneOlderThan(DateTimeImmutable $cutoff): int”

Delete rows older than $cutoff and return the number removed.