<commit_before><?php

namespace Sokil\Mongo;

use \Psr\Log\LoggerInterface;

/**
 * Connection manager and factory to get database and collection instances.
 * 
 * @link https://github.com/sokil/php-mongo#connecting Connecting
 * @link https://github.com/sokil/php-mongo#selecting-database-and-collection Get database and collection instance
 */
class Client
{
    private $_dsn;
    
    private $_connectOptions = array('connect' => true);
    
    /**
     *
     * @var \MongoClient
     */
    private $_mongoClient;
    
    private $_databasePool = array();
    
    /**
     * @var array Database to class mapping
     */
    protected $_mapping = array();
    
        
    private $_logger;
    
    private $_currentDatabaseName;
    
    /**
     * 
     * @param string $dsn Data Source Name<commit_msg>use lazy connection of mongo driver<commit_after><?php

namespace Sokil\Mongo;

use \Psr\Log\LoggerInterface;

/**
 * Connection manager and factory to get database and collection instances.
 * 
 * @link https://github.com/sokil/php-mongo#connecting Connecting
 * @link https://github.com/sokil/php-mongo#selecting-database-and-collection Get database and collection instance
 */
class Client
{
    private $_dsn;
    
    private $_connectOptions = array();
    
    /**
     *
     * @var \MongoClient
     */
    private $_mongoClient;
    
    private $_databasePool = array();
    
    /**
     * @var array Database to class mapping
     */
    protected $_mapping = array();
    
        
    private $_logger;
    
    private $_currentDatabaseName;
    
    /**
     * 
     * @param string $dsn Data Source Name
{'fraction_non_alphanumeric': 0.11117898594990837, 'fraction_numerical': 0.0, 'mean_word_length': 2.4411764705882355, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2524057', 'n_tokens_mistral': 484, 'n_tokens_neox': 481, 'n_words': 121}