public function __construct(\PDO $pdo = null, $dbEngine = '')
{
if (!$pdo) {
throw new DBAlert\DBException(\__('An instance of PDO was expected. ' . 'This parameter only defaults to NULL for unit testing purposes.'));
}
if (empty($dbEngine)) {
$dbEngine = $pdo->getAttribute(\PDO::ATTR_DRIVER_NAME);
}
$this->dbengine = $dbEngine;
$this->pdo = $pdo;
$this->pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
$this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
}