public function connect($host = false, $user = false, $password = false, $database = false, $newLink = false)
    {
        $this->connection = mysqli_connect($host, $user, $password, $newLink);

        if ($this->connection) {
            if ($this->selectDatabase($database)) {
                $this->query("SET CHARACTER SET utf8");
                $this->query("SET NAMES utf8");
                return $this->connection;
            } else {
                $message = 'Cannot select database ' . $database;
            }
        } else {
            $message = mysqli_error($this->connection);
        }

        if (!$this->connection) {
            trigger_error($message, E_USER_WARNING);
        }
    }