ActiveRecord\Table::map_names PHP Method

map_names() private method

Replaces any aliases used in a hash based condition.
private map_names ( &$hash, &$map ) : array
$hash array A hash
$map array Hash of used_name => real_name
return array Array with any aliases replaced with their read field name
    private function map_names(&$hash, &$map)
    {
        $ret = array();
        foreach ($hash as $name => &$value) {
            if (array_key_exists($name, $map)) {
                $name = $map[$name];
            }
            $ret[$name] = $value;
        }
        return $ret;
    }