private function createConnection(array $persisterConfig, $configName)
    {
        $options = isset($persisterConfig['parameters']['options']) && is_array($persisterConfig['parameters']['options']) ? $persisterConfig['parameters']['options'] : [];
        $definition = new Definition(
            'Doctrine\MongoDB\Connection',
            [$persisterConfig['parameters']['host'], $options, new Reference($configName)]
        );
        $definition->setPublic(false);
        return $definition;
    }
private function createConnection(array $persisterConfig, $configName)
    {
        $options = isset($persisterConfig['parameters']['options']) && is_array($persisterConfig['parameters']['options']) ? $persisterConfig['parameters']['options'] : [];
        $definition = new Definition(
            'Doctrine\MongoDB\Connection',
            [$persisterConfig['parameters']['host'], $options, new Reference($configName)]
        );
        $definition->setPublic(false);
        return $definition;
    }
private function createConnection ( array $ persisterConfig , $ configName ) { $ options = isset ( $ persisterConfig [ 'parameters' ] [ 'options' ] ) && is_array ( $ persisterConfig [ 'parameters' ] [ 'options' ] ) ? $ persisterConfig [ 'parameters' ] [ 'options' ] : [ ] ; $ definition = new Definition ( 'Doctrine\MongoDB\Connection' , [ $ persisterConfig [ 'parameters' ] [ 'host' ] , $ options , new Reference ( $ configName ) ] ) ; $ definition -> setPublic ( false ) ; return $ definition ; }
Creates the connection service definition.

@param   array   $persisterConfig
@param   string  $configName         The name of the connection configuration service
@return  Definition
Creates the connection service definition .