private function getConnectUri(\Phalcon\Config $config) {

        if($config->offsetExists('user') && $config->offsetExists('password')) {
            return "mongodb://".$config['user'].":".$config['password']."@".$config['host'].":".$config['port']."/".$config['dbname'];
        }
        else {
            return "mongodb://".$config['host'].":".$config['port']."/".$config['dbname'];
        }
    }
private function getConnectUri(\Phalcon\Config $config) {

        if($config->offsetExists('user') && $config->offsetExists('password')) {
            return "mongodb://".$config['user'].":".$config['password']."@".$config['host'].":".$config['port']."/".$config['dbname'];
        }
        else {
            return "mongodb://".$config['host'].":".$config['port']."/".$config['dbname'];
        }
    }
private function getConnectUri ( \ Phalcon \ Config $ config ) { if ( $ config -> offsetExists ( 'user' ) && $ config -> offsetExists ( 'password' ) ) { return "mongodb://" . $ config [ 'user' ] . ":" . $ config [ 'password' ] . "@" . $ config [ 'host' ] . ":" . $ config [ 'port' ] . "/" . $ config [ 'dbname' ] ; } else { return "mongodb://" . $ config [ 'host' ] . ":" . $ config [ 'port' ] . "/" . $ config [ 'dbname' ] ; } }
Get mongo connection URI

@param \Phalcon\Config $config
@return string
Get mongo connection URI