__construct() public method

Instantiate class
public __construct ( $dsn, $user = NULL, $pw = NULL, array $options = NULL )
$dsn string
$user string
$pw string
$options array array
Beispiel #1
0
 function __construct(array $options = NULL)
 {
     //set up connection
     $settings = \Base::instance()->get('db');
     $dsn = 'mysql:host=' . $settings['host'] . ';port=' . $settings['port'] . ';dbname=' . $settings['dbname'];
     parent::__construct($dsn, $settings['user'], $settings['pw']);
 }
Beispiel #2
0
 function __construct($dsn, $user = null, $pw = null, array $options = null)
 {
     parent::__construct($dsn, $user, $pw, $options);
 }