public function connect() {
		mysqli_report(MYSQLI_REPORT_STRICT);
		$settings = parse_url($this->dsn);

		// If we can't even parse the DSN, don't bother
		if (!isset($settings['path']) OR !isset($settings['host']) OR !isset($settings['user'])) {
			throw new \Exception('Could not connect to database: DSN incorrect');
		}

		// We don't support connecting to UNIX sockets the traditional way
		if ($settings['host'] == 'unix(') {
			throw new \Exception('Could not connect to database: UNIX socket syntax is wrong');
		}

		$settings['path'] = substr($settings['path'], 1);
		$this->database = @new \Mysqli($settings['host'], $settings['user'], $settings['pass'], $settings['path']);

		// If there is an error connecting to the database, stop doing what you're doing
		if ($this->database->connect_errno != 0) {
			throw new \Exception('Could not connect to database: ' . $this->database->connect_error);
		}

		$this->database->set_charset('utf8');
		$this->connected = true;
	}