hydratePhysicalQuantity.php
Table of Contents
Functions
- hydratePhysicalQuantity() : PhysicalQuantity|null
- Hydrate an array definition with the PhysicalQuantity class, down the whole chain.
Functions
hydratePhysicalQuantity()
Hydrate an array definition with the PhysicalQuantity class, down the whole chain.
hydratePhysicalQuantity([mixed $init = null ]) : PhysicalQuantity|null
A packaging chain is read one level at a time — the unit, then what one
package holds of it, then what one pallet holds of packages — and each level
carries its own weight and volume. Typing the head alone would leave a
consumer reading ->weight at the first level and ['weight'] below it, on
a structure whose entire point is the ratio between two levels. So every
valueReference is walked and typed too.
⚠️ Only the constructor path needs this. Reflection::hydrate() types the
chain on its own, PhysicalQuantity::$valueReference declaring the
attribute for it.
Use it in the 'products' definition in the DI container.
Parameters
- $init : mixed = null