public function parseFormatFromCldr(Locale $locale, $formatType, $formatLength = self::FORMAT_LENGTH_DEFAULT)
    {
        self::validateFormatType($formatType);
        self::validateFormatLength($formatLength);

        if (isset($this->parsedFormatsIndices[(string)$locale][$formatType][$formatLength])) {
            return $this->parsedFormats[$this->parsedFormatsIndices[(string)$locale][$formatType][$formatLength]];
        }

        if ($formatLength === self::FORMAT_LENGTH_DEFAULT) {
            $formatPath = 'numbers/' . $formatType . 'Formats/' . $formatType . 'FormatLength/' . $formatType . 'Format/pattern';
        } else {
            $formatPath = 'numbers/' . $formatType . 'Formats/' . $formatType . 'FormatLength[@type="' . $formatLength . '"]/' . $formatType . 'Format/pattern';
        }

        $model = $this->cldrRepository->getModelForLocale($locale);
        $format = $model->getElement($formatPath);

        if (empty($format)) {
            throw new Exception\UnableToFindFormatException('Number format was not found. Please check whether CLDR repository is valid.', 1280218995);
        }

        $parsedFormat = $this->parseFormat($format);

        $this->parsedFormatsIndices[(string)$locale][$formatType][$formatLength] = $format;
        return $this->parsedFormats[$format] = $parsedFormat;
    }