public __construct ( mixed $host, string $username = null, string $password = null, string $db = null, $label = 'n/a' ) | ||
$host | mixed | string (hostname) or associative array with parameter to use |
$username | string | user name to use for login |
$password | string | password to use for login |
$db | string | optional database to select |
public function __construct($host, $username = null, $password = null, $db = null, $label = 'n/a')
{
$this->setConnectParams($host, $username = null, $password = null, $db = null, $label = 'n/a');
if (is_array($host) && isset($host['label'])) {
$this->connectionLabel = $host['label'];
} else {
$this->connectionLabel = $label;
}
self::$instanceCntr++;
}