You are here

public function MapNamingStrategy::__construct in Zircon Profile 8

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

Initialize.

Parameters

array $mapping Map for name conversion on hydration:

array $reverse Reverse map for name conversion on extraction:

File

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

Class

MapNamingStrategy

Namespace

Zend\Hydrator\NamingStrategy

Code

public function __construct(array $mapping, array $reverse = null) {
  $this->mapping = $mapping;
  $this->reverse = $reverse ?: $this
    ->flipMapping($mapping);
}