mini\Database\Dehydrator
final
class
Documentation
Converts between entity objects and SQL-compatible arrays
Handles hydration/dehydration via:
- Hydratable interface - if entity implements Hydratable, uses fromSqlRow()
- Dehydratable interface - if entity implements Dehydratable, uses toSqlRow()
- Reflection fallback - maps properties to columns with type conversion
Used by PartialQuery for reading and by write operations for validation.
Properties (1)
private
static
array $hydrating
Track classes currently being hydrated to detect recursion
Methods (4)
Hydrate a database row to an entity instance
Hydrate using reflection (maps columns to properties with type conversion)
Dehydrate an entity to a SQL-compatible array
Dehydrate using reflection (reads public properties, converts values)