hydrateDefinedTerm.php
Table of Contents
Functions
- hydrateDefinedTerm() : mixed
- Hydrate an array definition with the DefinedTerm class.
Functions
hydrateDefinedTerm()
Hydrate an array definition with the DefinedTerm class.
hydrateDefinedTerm([mixed $init = null ][, DefinedTerm> $class = DefinedTerm::class ]) : mixed
Handles both single DefinedTerm array and array of DefinedTerm.
🔑 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
- $init : mixed = null
-
Single DefinedTerm data or array of DefinedTerm data.
- $class : DefinedTerm> = DefinedTerm::class
-
The class to hydrate into. A subclass lets an enriched term keep the properties DefinedTerm does not declare.