public static function setDb($db, $connection_name = self::DEFAULT_CONNECTION) {
        
        static::_initDbConfigWithDefaultVals($connection_name);
        static::$_db[$connection_name] = $db;
    }
public static function setDb($db, $connection_name = self::DEFAULT_CONNECTION) {
        
        static::_initDbConfigWithDefaultVals($connection_name);
        static::$_db[$connection_name] = $db;
    }
public static function setDb ( $ db , $ connection_name = self :: DEFAULT_CONNECTION ) { static :: _initDbConfigWithDefaultVals ( $ connection_name ) ; static :: $ _db [ $ connection_name ] = $ db ; }
Set the PDO object used by DBConnector to communicate with the database.
This is public in case the DBConnector should use a ready-instantiated
PDO object as its database connection. Accepts an optional string key
to identify the connection if multiple connections are used.
@param PDO $db
@param string $connection_name Which connection to use
Set the PDO object used by DBConnector to communicate with the database . This is public in case the DBConnector should use a ready - instantiated PDO object as its database connection . Accepts an optional string key to identify the connection if multiple connections are used .