Nothing is declared by default: no document is purged before the project decides its durations.
Each collection declares `days` (how long a document is kept), the date it counts from (`field`, `ctime` by default)
and a `filter` narrowing what is purged (only the archived ones, for instance). The purge is a simulation by
default ([`purge`](https://mmoframework.fr/en/documentation/mmo.core/php/helpers/Retention.md#retention-purge)): it counts and lists, it deletes nothing. Applied, it deletes through the entities
(`removePermanently()` then `\MMO\commit()`): the journal records each deletion as any other. Either way it writes a
report, with the `_id` of every document deleted (or to delete), into [`$reportFolder`](https://mmoframework.fr/en/documentation/mmo.core/php/helpers/Retention.md#retention-reportfolder): what was deleted can be
checked, and the data guard of a reprise (my.oviepro's `data-guard compare --expect=retention`) declares it.
A journal (a `LogQuery` collection: a hash chain) is purged by its repository's `purgeLogs()` when it has one
(MongoRepository): its oldest lines only, the purge sealed, so that `log-verify` still finds the chain whole; it
counts from `ctime`, every kind of line alike (writes and READs of `sante` data).
// configs/config.json
"MMO\\core\\helpers\\Retention": {"collections": {"logQuerys": {"days": 1095}, "mailLogs": {"days": 365}}}
$report = Retention::Shared()->purge(\MMO\get('repository')); // the simulation: what would go
$report = Retention::Shared()->purge(\MMO\get('repository'), false); // the purge
(Re)create the shared instance immediately, configured with $config merged into the class's existing config.
static function Instantiate(array $config = []): staticUnlike a plain [`Shared()`](https://mmoframework.fr/en/documentation/mmo.core/php/helpers/Retention.md#retention-shared) call (which lazily builds the instance from whatever config was already loaded),
this lets you supply/override config right before the instance is built.
Remove the shared instance, so the next Shared() call creates a fresh one.
static function Unshare(bool $serialize = true): bool
See
serialize) and kept as the class's config, so the next instance created picks up where this one left off; if false, the instance is simply discarded and the next one starts from the class's original config