src/Incoming/Processor.php
protected function hydrateModel($input_data, $model, Hydrator $hydrator = null, Map $context = null)
    {
        $hydrator = $hydrator ?: $this->getHydratorForModel($model);

        $this->enforceProcessCompatibility(($hydrator instanceof ContextualHydrator), (null !== $context), $hydrator);

        if ($hydrator instanceof ContextualHydrator) {
            return $hydrator->hydrate($input_data, $model, $context);
        }

        return $hydrator->hydrate($input_data, $model);
    }
protected function hydrateModel($input_data, $model, Hydrator $hydrator = null, Map $context = null)
    {
        $hydrator = $hydrator ?: $this->getHydratorForModel($model);

        $this->enforceProcessCompatibility(($hydrator instanceof ContextualHydrator), (null !== $context), $hydrator);

        if ($hydrator instanceof ContextualHydrator) {
            return $hydrator->hydrate($input_data, $model, $context);
        }

        return $hydrator->hydrate($input_data, $model);
    }
protected function hydrateModel ( $ input_data , $ model , Hydrator $ hydrator = null , Map $ context = null ) { $ hydrator = $ hydrator ? : $ this -> getHydratorForModel ( $ model ) ; $ this -> enforceProcessCompatibility ( ( $ hydrator instanceof ContextualHydrator ) , ( null !== $ context ) , $ hydrator ) ; if ( $ hydrator instanceof ContextualHydrator ) { return $ hydrator -> hydrate ( $ input_data , $ model , $ context ) ; } return $ hydrator -> hydrate ( $ input_data , $ model ) ; }
Hydrate a model from incoming data.

If a hydrator isn't provided, an attempt will be made to automatically
resolve and build an appropriate hydrator from the provided factory.

@param mixed $input_data The input data.
@param mixed $model The model to hydrate.
@param Hydrator|null $hydrator The hydrator to use.
@param Map|null $context An optional generic key-value map, for providing
contextual values during the process.
@return mixed The hydrated model.
Hydrate a model from incoming data .