You are here

public function StrategyChain::hydrate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-hydrator/src/Strategy/StrategyChain.php \Zend\Hydrator\Strategy\StrategyChain::hydrate()

Converts the given value so that it can be hydrated by the hydrator.

Parameters

mixed $value The original value.:

array $data (optional) The original data for context.:

Return value

mixed Returns the value that should be hydrated.

Overrides StrategyInterface::hydrate

File

vendor/zendframework/zend-hydrator/src/Strategy/StrategyChain.php, line 65

Class

StrategyChain

Namespace

Zend\Hydrator\Strategy

Code

public function hydrate($value) {
  foreach ($this->hydrationStrategies as $strategy) {
    $value = $strategy
      ->hydrate($value);
  }
  return $value;
}