src/Phinx/Db/Adapter/MysqlAdapter.php 1 location
|
@@ 106-110 (lines=5) @@
|
| 103 |
|
|
| 104 |
|
// support arbitrary \PDO::MYSQL_ATTR_* driver options and pass them to PDO |
| 105 |
|
// http://php.net/manual/en/ref.pdo-mysql.php#pdo-mysql.constants |
| 106 |
|
foreach ($options as $key => $option) { |
| 107 |
|
if (strpos($key, 'mysql_attr_') === 0) { |
| 108 |
|
$driverOptions[constant('\PDO::' . strtoupper($key))] = $option; |
| 109 |
|
} |
| 110 |
|
} |
| 111 |
|
|
| 112 |
|
try { |
| 113 |
|
$db = new \PDO($dsn, $options['user'], $options['pass'], $driverOptions); |
src/Phinx/Db/Adapter/SqlServerAdapter.php 1 location
|
@@ 79-83 (lines=5) @@
|
| 76 |
|
|
| 77 |
|
// support arbitrary \PDO::SQLSRV_ATTR_* driver options and pass them to PDO |
| 78 |
|
// http://php.net/manual/en/ref.pdo-sqlsrv.php#pdo-sqlsrv.constants |
| 79 |
|
foreach ($options as $key => $option) { |
| 80 |
|
if (strpos($key, 'sqlsrv_attr_') === 0) { |
| 81 |
|
$driverOptions[constant('\PDO::' . strtoupper($key))] = $option; |
| 82 |
|
} |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
try { |
| 86 |
|
$db = new \PDO($dsn, $options['user'], $options['pass'], $driverOptions); |