hydrateMeetingReport.php
Table of Contents
Functions
- hydrateMeetingReport() : mixed
- Hydrate an array definition with the MeetingReport class, or with a subclass of it.
Functions
hydrateMeetingReport()
Hydrate an array definition with the MeetingReport class, or with a subclass of it.
hydrateMeetingReport([mixed $init = null ][, DefinedTerm>|array<string, DefinedTerm>|array<string, DefinedTerm>>> $termClass = ThesaurusTerm::class ][, MeetingReport> $class = MeetingReport::class ]) : mixed
Handles both a single report array and an array of reports.
Each nested reference is hydrated only when the raw value is an array — when there is
something to hydrate. The helper's answer is then written as is, null included : an
array that resolves to nothing becomes null, never a leftover raw array, so the report
answers the same thing as the nested helper called on its own. Anything that is not an
array — an unresolved string reference, an already typed instance — is left untouched.
What it resolves :
followUp— what comes next, through hydrateFollowUp() ;tagsandtopics— several terms each ;author— whoever wrote it, anOrganization|Personunion that only the payload's@typecan settle.
⚠️ attendee is deliberately left alone here. Who sits at a table depends on the kind
of meeting — a customer's staff, a colleague — and this helper cannot know. Each family
resolves it after this one has run, which is what hydrateVisitReport() does.
🔑 An empty followUp list stays an empty list. « This report has no follow-up » is
an answer worth serving, and a reader walking the value deserves a list to walk —
hydrateFollowUp() holds that rule, and this helper writes back whatever it
answers.
🔑 The vocabularies are read as the class their family serves. Those families carry
properties DefinedTerm does not declare — color first among them — so hydrating
them as a plain DefinedTerm dropped those properties silently, and the same term changed
shape depending on where it was read. The class is a parameter rather than a hard-wired
name, in the two forms termClassOf() reads : one class for every property, or a
map naming them one by one.
🔑 The target class is a parameter too, so a subclass reuses this whole body rather than copying it : hydrateVisitReport() asks for its own class here, then resolves what only a visit carries.
Parameters
- $init : mixed = null
-
Single report data or array of report data.
- $termClass : DefinedTerm>|array<string, DefinedTerm>|array<string, DefinedTerm>>> = ThesaurusTerm::class
-
The class the term properties are hydrated into, or a map naming them one by one. A map may carry entries this helper does not read. See termClassOf().
- $class : MeetingReport> = MeetingReport::class
-
The class to build — a subclass of MeetingReport, or itself.