protected function parseSingleDataProvider(
        ContainerInterface $container,
        DataProviderDefinitionInterface $providers,
        array $information,
        $name
    ) {
        if (isset($information['factory'])) {
            $providerInformation = (new \ReflectionClass($information['factory']))->newInstance()->build($information);
        } else {
            // Determine the name.
            if ($name && !$this->isSpecialName($name)) {
                $providerName = $name;
            } elseif ('default' === $name) {
                $providerName = $container->getName();
            } elseif (isset($information['source'])) {
                $providerName = $information['source'];
            } else {
                $providerName = $container->getName();
            }

            // Check config if it already exists, if not, add it.
            if (!$providers->hasInformation($providerName)) {
                $providerInformation = new ContaoDataProviderInformation();
                $providerInformation->setName($providerName);
                $providers->addInformation($providerInformation);
            } else {
                $providerInformation = $providers->getInformation($providerName);
            }

            if (!$providerInformation->getTableName()) {
                if (isset($information['source'])) {
                    $providerInformation
                        ->setTableName($information['source']);
                } else {
                    $providerInformation
                        ->setTableName($providerName);
                }
            }

            if (isset($information['class'])) {
                $providerInformation->setClassName($information['class']);
            }
        }

        return $providerInformation;
    }