The data of a person, everywhere (ISO/IEC 27001 A.5.34, A.8.10; GDPR articles 15 and 17): her document and the documents that refer to her, found through the schemas -- a property whose entity is hers (Contrat::$salarie for a Salarie), followed again from the collections of $follow (a contract's accidents).
class MMO\core\helpers\PersonalData
use MMO\core\classes\tSingleton
- [`find`](https://mmoframework.fr/documentation/mmo.core/php/helpers/PersonalData.md#personaldata-find) lists them: collection, id, through which property, how far from the person;
- [`export`](https://mmoframework.fr/documentation/mmo.core/php/helpers/PersonalData.md#personaldata-export) gives their data (the right of access), as the entities export it;
- [`erase`](https://mmoframework.fr/documentation/mmo.core/php/helpers/PersonalData.md#personaldata-erase) is a simulation by default: it says what it would do to each one. Applied, the person's own document
keeps its id and its references, and loses every value classified `personnel` or `sante` (its schema's `default`,
else null, '' or []): what refers to her still does, and holds no more of her. A document that refers to her is
treated as [`$erase`](https://mmoframework.fr/documentation/mmo.core/php/helpers/PersonalData.md#personaldata-erase) says of its collection: `anonymize` (the same, its own personal values blanked), `delete`,
or `keep` (the default: listed only -- an accident declared to the CPAM is kept as long as the law asks).
Every change goes through the entities and `\MMO\commit()` (the journal records each), and the report is written
([`Retention::writeReport`](https://mmoframework.fr/documentation/mmo.core/php/helpers/Retention.md#retention-writereport)): what was erased, where, can be checked afterwards.
// configs/config.json
"MMO\\core\\helpers\\PersonalData": {"follow": ["contrats"], "erase": {"contrats": "anonymize", "accidentTravails": "keep"}}
$report = PersonalData::Shared()->erase(\MMO\get('repository'), 'salaries', '68ef75da03db30e8bd043956'); // what it would do
$report = PersonalData::Shared()->erase(\MMO\get('repository'), 'salaries', '68ef75da03db30e8bd043956', false); // done
(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/documentation/mmo.core/php/helpers/PersonalData.md#personaldata-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
Voir
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