hydrateContactPoint.php
Table of Contents
Functions
- hydrateContactPoint() : array<string|int, ContactPoint>|mixed|null
- Hydrate an array of ContactPoint objects.
Functions
hydrateContactPoint()
Hydrate an array of ContactPoint objects.
hydrateContactPoint([mixed $properties = null ]) : array<string|int, ContactPoint>|mixed|null
Anything that is not an array is handed back untouched — a lone
ContactPoint or an unresolved string reference are legal shapes of the
contactPoint property, and this helper is not the place to reject them. An
array that is not an indexed, non-empty list yields null, so a caller can
tell "nothing to hydrate" from a result.
🔑 A bare reference survives inside a list, exactly as it does on its own : a list of unresolved handles comes back as it stands, and only an entry that was an array and resolved to nothing is dropped. The keys stay gap-free — a filtered list left with holes serializes as a JSON object, and a consumer walking the value gets something it cannot walk.
Parameters
- $properties : mixed = null
-
An indexed array of ContactPoint definitions, or any value to pass through.