DependencyInjection/ONGRConnectionsExtension.php
private function initShops(ContainerBuilder $container, array $config)
    {
        $activeShop = !empty($config['active_shop']) ? $config['active_shop'] : null;
        if ($activeShop !== null && !isset($config['shops'][$activeShop])) {
            throw new LogicException(
                "Parameter 'ongr_connections.active_shop' must be set to one"
                . "of the values defined in 'ongr_connections.shops'."
            );
        }

        $container->setParameter('ongr_connections.active_shop', $activeShop);
        $container->setParameter('ongr_connections.shops', $config['shops']);

        $container->setDefinition(
            'ongr_connections.shop_service',
            new Definition(
                'ONGR\ConnectionsBundle\Service\ShopService',
                [
                    $activeShop,
                    $config['shops'],
                ]
            )
        );
    }
private function initShops(ContainerBuilder $container, array $config)
    {
        $activeShop = !empty($config['active_shop']) ? $config['active_shop'] : null;
        if ($activeShop !== null && !isset($config['shops'][$activeShop])) {
            throw new LogicException(
                "Parameter 'ongr_connections.active_shop' must be set to one"
                . "of the values defined in 'ongr_connections.shops'."
            );
        }

        $container->setParameter('ongr_connections.active_shop', $activeShop);
        $container->setParameter('ongr_connections.shops', $config['shops']);

        $container->setDefinition(
            'ongr_connections.shop_service',
            new Definition(
                'ONGR\ConnectionsBundle\Service\ShopService',
                [
                    $activeShop,
                    $config['shops'],
                ]
            )
        );
    }
Set up shops.

@param ContainerBuilder $container
@param array            $config

@throws LogicException