src/ServiceProvider/DoctrineDbalServiceProvider.php
private function getDbsDefinition(Container $container): callable
    {
        return function () use ($container) {
            $container['doctrine.dbal.dbs.options.initializer']();

            $dbs = new Container();
            foreach ($container['doctrine.dbal.dbs.options'] as $name => $options) {
                if ($container['doctrine.dbal.dbs.default'] === $name) {
                    $config = $container['doctrine.dbal.db.config'];
                    $manager = $container['doctrine.dbal.db.event_manager'];
                } else {
                    $config = $container['doctrine.dbal.dbs.config'][$name];
                    $manager = $container['doctrine.dbal.dbs.event_manager'][$name];
                }

                $dbs[$name] = function () use ($options, $config, $manager) {
                    return DriverManager::getConnection($options['connection'], $config, $manager);
                };
            }

            return $dbs;
        };
    }
private function getDbsDefinition(Container $container): callable
    {
        return function () use ($container) {
            $container['doctrine.dbal.dbs.options.initializer']();

            $dbs = new Container();
            foreach ($container['doctrine.dbal.dbs.options'] as $name => $options) {
                if ($container['doctrine.dbal.dbs.default'] === $name) {
                    $config = $container['doctrine.dbal.db.config'];
                    $manager = $container['doctrine.dbal.db.event_manager'];
                } else {
                    $config = $container['doctrine.dbal.dbs.config'][$name];
                    $manager = $container['doctrine.dbal.dbs.event_manager'][$name];
                }

                $dbs[$name] = function () use ($options, $config, $manager) {
                    return DriverManager::getConnection($options['connection'], $config, $manager);
                };
            }

            return $dbs;
        };
    }
private function getDbsDefinition ( Container $ container ) : callable { return function ( ) use ( $ container ) { $ container [ 'doctrine.dbal.dbs.options.initializer' ] ( ) ; $ dbs = new Container ( ) ; foreach ( $ container [ 'doctrine.dbal.dbs.options' ] as $ name => $ options ) { if ( $ container [ 'doctrine.dbal.dbs.default' ] === $ name ) { $ config = $ container [ 'doctrine.dbal.db.config' ] ; $ manager = $ container [ 'doctrine.dbal.db.event_manager' ] ; } else { $ config = $ container [ 'doctrine.dbal.dbs.config' ] [ $ name ] ; $ manager = $ container [ 'doctrine.dbal.dbs.event_manager' ] [ $ name ] ; } $ dbs [ $ name ] = function ( ) use ( $ options , $ config , $ manager ) { return DriverManager :: getConnection ( $ options [ 'connection' ] , $ config , $ manager ) ; } ; } return $ dbs ; } ; }
@param Container $container

@return callable
@param Container $container