private function registerConfig(
        string $driver,
        string $bundle,
        array $bundles,
        array $configs,
        LoaderInterface $loader
    ) {
        /** @var bool|null $isEnabled */
        $isEnabled = $configs['db_drivers'][$driver];
        if (false === $isEnabled) {
            return;
        }

        $bundleIsRegistered = array_key_exists($bundle, $bundles);
        if ($isEnabled && false === $bundleIsRegistered) {
            throw new LogicException(
                sprintf(
                    'Cannot enable "%s" driver as the bundle "%s" is missing',
                    $driver,
                    $bundle
                )
            );
        }

        if ($bundleIsRegistered) {
            $loader->load($driver.'.xml');
        }
    }
private function registerConfig(
        string $driver,
        string $bundle,
        array $bundles,
        array $configs,
        LoaderInterface $loader
    ) {
        /** @var bool|null $isEnabled */
        $isEnabled = $configs['db_drivers'][$driver];
        if (false === $isEnabled) {
            return;
        }

        $bundleIsRegistered = array_key_exists($bundle, $bundles);
        if ($isEnabled && false === $bundleIsRegistered) {
            throw new LogicException(
                sprintf(
                    'Cannot enable "%s" driver as the bundle "%s" is missing',
                    $driver,
                    $bundle
                )
            );
        }

        if ($bundleIsRegistered) {
            $loader->load($driver.'.xml');
        }
    }
private function registerConfig ( string $ driver , string $ bundle , array $ bundles , array $ configs , LoaderInterface $ loader ) { /** @var bool|null $isEnabled */ $ isEnabled = $ configs [ 'db_drivers' ] [ $ driver ] ; if ( false === $ isEnabled ) { return ; } $ bundleIsRegistered = array_key_exists ( $ bundle , $ bundles ) ; if ( $ isEnabled && false === $ bundleIsRegistered ) { throw new LogicException ( sprintf ( 'Cannot enable "%s" driver as the bundle "%s" is missing' , $ driver , $ bundle ) ) ; } if ( $ bundleIsRegistered ) { $ loader -> load ( $ driver . '.xml' ) ; } }
Registers driver configuration.

@param string $driver The driver name to register (doctrine_orm, eloquent_orm, ...).
@param string $bundle The bundle that should be checked for existence.
@param Bundle[] $bundles The bundles registered in current kernel.
@param array $configs The processed config array.
@param LoaderInterface $loader Config file loader
Registers driver configuration .