+ public function __construct(
+ $dsn, $username, $password, $callTypes = 'i', $msns = array()
+ ) {
+ parent::__construct($callTypes, $msns);
+
+ $this->dsn = $dsn;
+ $this->username = $username;
+ $this->password = $password;
+ //check if the credentials are correct
+ $this->connect();
+ }
+
+ /**
+ * Connect to the SQL server.
+ * SQL servers close the connection automatically after some hours,
+ * and since calls often don't come in every minute, we will have
+ * disconnects in between.
+ * Thus, we will reconnect on every location load.
+ *
+ * @return void
+ */
+ protected function connect()