public static function createParsersFromFormats($formats, UriInterface $uri, LoggerInterface $logger)
    {
        $formatBits = intval($formats);

        // Run through all registered parsers and yield the requested instances
        foreach (self::$parsers as $parserFormat => $parserClass) {
            if ($parserFormat & $formatBits) {
                yield $parserFormat => new $parserClass($uri, $logger);
            }
        }
    }