You are here

public function MapNamingStrategy::hydrate in Zircon Profile 8.0

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

Converts the given name so that it can be extracted by the hydrator.

Parameters

string $name The original name:

Return value

mixed The hydrated name

Overrides NamingStrategyInterface::hydrate

File

vendor/zendframework/zend-hydrator/src/NamingStrategy/MapNamingStrategy.php, line 66

Class

MapNamingStrategy

Namespace

Zend\Hydrator\NamingStrategy

Code

public function hydrate($name) {
  if (array_key_exists($name, $this->mapping)) {
    return $this->mapping[$name];
  }
  return $name;
}