interface HydratorInterface (View source)

The HydratorInterface defines methods all hydrator need to implement

Methods

array
hydrate(object $document, array $data, array $hints = [])

Hydrate array of MongoDB document data into the given document object.

Details

array hydrate(object $document, array $data, array $hints = [])

Hydrate array of MongoDB document data into the given document object.

Parameters

object $document The document object to hydrate the data into.
array $data The array of document data.
array $hints Any hints to account for during reconstitution/lookup of the document.

Return Value

array $values The array of hydrated values.