-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_dns_strings.php
38 lines (35 loc) · 1.45 KB
/
test_dns_strings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
use js\tools\dbhandler\parameters\ConnectionParameters;
use js\tools\dbhandler\parameters\MySQL;
use js\tools\dbhandler\parameters\OCI;
use js\tools\dbhandler\parameters\ODBC;
use js\tools\dbhandler\parameters\PostgreSQL;
use js\tools\dbhandler\parameters\SQLite;
use js\tools\dbhandler\parameters\SQLServerOfficial;
use js\tools\dbhandler\parameters\SQLServerSybase;
use js\tools\dbhandler\parameters\SQLServerTDS;
use js\tools\dbhandler\parameters\SQLSrv;
require 'autoloader.php';
$host = 'localhost';
$port = 1234;
$dbname = 'test';
$username = 'test';
$password = 'test';
/** @var ConnectionParameters[] $parameters */
$parameters = [
MySQL::viaHost($dbname, $username, $password, $host, $port),
PostgreSQL::viaHost($dbname, $username, $password, $host, $port),
SQLSrv::viaHost($dbname, $username, $password, $host, $port),
SQLSrv::viaHost($dbname, $username, $password, 'foo.database.windows.net', $port),
SQLServerOfficial::viaHost($dbname, $username, $password, $host, $port),
SQLServerSybase::viaHost($dbname, $username, $password, $host, $port),
SQLServerTDS::viaHost($dbname, $username, $password, $host, $port),
ODBC::viaCataloged($dbname, $username, $password),
ODBC::viaHost($dbname, $username, $password, $host),
OCI::viaHost($dbname, $username, $password, $host, $port),
SQLite::create(':memory:', $username, $password),
];
foreach ($parameters as $container)
{
echo get_class($container), ' - ', $container->getConnectionString(), PHP_EOL;
}