-
Notifications
You must be signed in to change notification settings - Fork 44
Journals
Michael Best edited this page Feb 2, 2023
·
1 revision
Journals use the observer/observable pattern, and thus need to be registered to Laboratory before they will receive experiment data.
$laboratory->addJournal(new \MyApp\RedisJournal);
// OR
$laboratory->setJournals([
new \MyApp\RedisJournal,
new \MyApp\AnotherJournal
]);
As you can see, you can use the addJournal()
method on the Laboratory to register new journal instances for reporting. Alternatively, you can use the setJournals()
method with an array of Journal instances to set many Journals at once.
All registered Journals will receive all experiment results.
That's all there is to it! I'm hoping that lovely people will contribute a bunch of re-usable Journals for common data storage systems. When this happens, I'll update this page with a list of links to them.