public function __construct(array $options)
{
if (!isset($options['database']) || !isset($options['host']) || !isset($options['username']) || !isset($options['password'])) {
throw new Exception('Error: The proper database credentials were not passed.');
}
$this->connection = new \mysqli($options['host'], $options['username'], $options['password'], $options['database']);
if ($this->connection->connect_error != '') {
throw new Exception('Error: Could not connect to database. Connection Error #' . $this->connection->connect_errno . ': ' . $this->connection->connect_error);
}
}