You are here

interface StrategyInterface in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/zendframework/zend-hydrator/src/Strategy/StrategyInterface.php \Zend\Hydrator\Strategy\StrategyInterface
  2. 8.0 vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/StrategyInterface.php \Zend\Stdlib\Hydrator\Strategy\StrategyInterface
Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-hydrator/src/Strategy/StrategyInterface.php \Zend\Hydrator\Strategy\StrategyInterface

@todo v3.0, add optional object/data to extract/hydrate.

Hierarchy

Expanded class hierarchy of StrategyInterface

All classes that implement StrategyInterface

1 file declares its use of StrategyInterface
StrategyInterface.php in vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/StrategyInterface.php

File

vendor/zendframework/zend-hydrator/src/Strategy/StrategyInterface.php, line 15

Namespace

Zend\Hydrator\Strategy
View source
interface StrategyInterface {

  /**
   * Converts the given value so that it can be extracted by the hydrator.
   *
   * @param mixed   $value The original value.
   * @param object $object (optional) The original object for context.
   * @return mixed Returns the value that should be extracted.
   */
  public function extract($value);

  /**
   * Converts the given value so that it can be hydrated by the hydrator.
   *
   * @param mixed $value The original value.
   * @param array  $data (optional) The original data for context.
   * @return mixed Returns the value that should be hydrated.
   */
  public function hydrate($value);

}

Members

Namesort descending Modifiers Type Description Overrides
StrategyInterface::extract public function Converts the given value so that it can be extracted by the hydrator. 7
StrategyInterface::hydrate public function Converts the given value so that it can be hydrated by the hydrator. 7