protected function join($key, $value, $level = 0)
    {
        if ($level > 0) {
            $key = $key . self::LEVEL_SEPARATOR . $level;
        }

        $valueParts = [];
        foreach ($this->unSerializeMap($value) as $mappedKey) {
            $mappedKey = $this->transformReferenceToMappedKey($mappedKey);
            $valueParts[$this->getMappedKeyIndex($mappedKey, $key)] = $this->getDriver()->get($mappedKey);
        }

        uksort($valueParts, 'strnatcmp');
        $value = implode('', $valueParts);
        if ($this->isSplit($value)) {
            $value = $this->join($key, $value, $level + 1);
        }
        return $value;
    }