DataMapper/ModelDataMapper.php
protected function setModelValueFromElement(ElementInterface $child)
    {
        $propertyPath = $child->getPropertyPath();
        
        if ($propertyPath instanceof PropertyPathInterface) {
            if ($this->propertyAccessor->isWritable($this->data, $propertyPath)) {
                if ($child->hasTransformer()) {
                    $transformer = $child->getTransformer();
                    $transformer->reverseTransform($this->data, $propertyPath, $child->getValue());
                } else {
                    $this->propertyAccessor->setValue($this->data, $propertyPath, $child->getValue());
                }
            }
        }
    }
protected function setModelValueFromElement(ElementInterface $child)
    {
        $propertyPath = $child->getPropertyPath();
        
        if ($propertyPath instanceof PropertyPathInterface) {
            if ($this->propertyAccessor->isWritable($this->data, $propertyPath)) {
                if ($child->hasTransformer()) {
                    $transformer = $child->getTransformer();
                    $transformer->reverseTransform($this->data, $propertyPath, $child->getValue());
                } else {
                    $this->propertyAccessor->setValue($this->data, $propertyPath, $child->getValue());
                }
            }
        }
    }
protected function setModelValueFromElement ( ElementInterface $ child ) { $ propertyPath = $ child -> getPropertyPath ( ) ; if ( $ propertyPath instanceof PropertyPathInterface ) { if ( $ this -> propertyAccessor -> isWritable ( $ this -> data , $ propertyPath ) ) { if ( $ child -> hasTransformer ( ) ) { $ transformer = $ child -> getTransformer ( ) ; $ transformer -> reverseTransform ( $ this -> data , $ propertyPath , $ child -> getValue ( ) ) ; } else { $ this -> propertyAccessor -> setValue ( $ this -> data , $ propertyPath , $ child -> getValue ( ) ) ; } } } }
Transforms value if needed or directly changes model property

@param ElementInterface $child
Transforms value if needed or directly changes model property