public static function values($data, $path = [], $base = null)
    {
        if (!$path) {
            $base = $base ?: 0;
            return [$base => $data];
        }

        $field = array_shift($path);

        if ($field === '*') {
            $values = [];
            foreach ($data as $key => $value) {
                $values = array_merge($values, static::values($value, $path, $base . '.' . $key));
            }
            return $values;
        } elseif (!isset($data[$field])) {
            return [];
        } elseif (!$path) {
            return [$base ? $base . '.' . $field : $field => $data[$field]];
        } else {
            return static::values($data[$field], $path, $base ? $base . '.' . $field : $field);
        }
    }