source/Core/InputValidator.php
private function _setFields($object, $fields)
    {
        $fields = is_array($fields) ? $fields : [];
        foreach ($fields as $sKey => $sValue) {
            $object->$sKey = oxNew('oxField', $sValue);
        }

        return $object;
    }
private function _setFields($object, $fields)
    {
        $fields = is_array($fields) ? $fields : [];
        foreach ($fields as $sKey => $sValue) {
            $object->$sKey = oxNew('oxField', $sValue);
        }

        return $object;
    }
private function _setFields ( $ object , $ fields ) { $ fields = is_array ( $ fields ) ? $ fields : [ ] ; foreach ( $ fields as $ sKey => $ sValue ) { $ object -> $ sKey = oxNew ( 'oxField' , $ sValue ) ; } return $ object ; }
Creates oxAddress object from given array.

@param User|Address $object
@param array        $fields

@return User|Address
Creates oxAddress object from given array .