You are here

public function AbstractHydrator::extractValue in Zircon Profile 8.0

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

Converts a value for extraction. 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.:

mixed $object The object is optionally provided as context.:

Return value

mixed

4 calls to AbstractHydrator::extractValue()
ArraySerializable::extract in vendor/zendframework/zend-hydrator/src/ArraySerializable.php
Extract values from the provided object
ClassMethods::extract in vendor/zendframework/zend-hydrator/src/ClassMethods.php
Extract values from an object with class methods
ObjectProperty::extract in vendor/zendframework/zend-hydrator/src/ObjectProperty.php
Extracts the accessible non-static properties of the given $object.
Reflection::extract in vendor/zendframework/zend-hydrator/src/Reflection.php
Extract values from an object

File

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

Class

AbstractHydrator

Namespace

Zend\Hydrator

Code

public function extractValue($name, $value, $object = null) {
  if ($this
    ->hasStrategy($name)) {
    $strategy = $this
      ->getStrategy($name);
    $value = $strategy
      ->extract($value, $object);
  }
  return $value;
}