You are here

public function AbstractHydrator::hydrateValue in Zircon Profile 8

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

Converts a value for hydration. If no strategy exists the plain value is returned.

Parameters

string $name The name of the strategy to use.:

mixed $value The value that should be converted.:

array $data The whole data is optionally provided as context.:

Return value

mixed

4 calls to AbstractHydrator::hydrateValue()
ArraySerializable::hydrate in vendor/zendframework/zend-hydrator/src/ArraySerializable.php
Hydrate an object
ClassMethods::hydrate in vendor/zendframework/zend-hydrator/src/ClassMethods.php
Hydrate an object by populating getter/setter methods
ObjectProperty::hydrate in vendor/zendframework/zend-hydrator/src/ObjectProperty.php
Hydrate an object by populating public properties
Reflection::hydrate in vendor/zendframework/zend-hydrator/src/Reflection.php
Hydrate $object with the provided $data.

File

vendor/zendframework/zend-hydrator/src/AbstractHydrator.php, line 137

Class

AbstractHydrator

Namespace

Zend\Hydrator

Code

public function hydrateValue($name, $value, $data = null) {
  if ($this
    ->hasStrategy($name)) {
    $strategy = $this
      ->getStrategy($name);
    $value = $strategy
      ->hydrate($value, $data);
  }
  return $value;
}