Nextras\Orm\Mapper\Dbal\StorageReflection\StorageReflection::convertEntityToStorage PHP Метод

convertEntityToStorage() публичный Метод

public convertEntityToStorage ( $in )
    public function convertEntityToStorage($in)
    {
        $out = [];
        foreach ($in as $key => $val) {
            if (isset($this->mappings[self::TO_STORAGE][$key][0])) {
                $newKey = $this->mappings[self::TO_STORAGE][$key][0];
            } else {
                $newKey = $this->convertEntityToStorageKey($key);
            }
            if (isset($this->modifiers[$newKey])) {
                $newKey .= $this->modifiers[$newKey];
            }
            if (isset($this->mappings[self::TO_STORAGE][$key][1])) {
                $converter = $this->mappings[self::TO_STORAGE][$key][1];
                $out[$newKey] = $converter($val, $newKey);
            } else {
                $out[$newKey] = $val;
            }
        }
        return $out;
    }