在PHP对象中包含全局变量

Hopefully this is a straight forward question:

I am looking to create a class, and I want to include my database variable ($mysql) in it so I can do DB interactions. So far, I've been making it global inside functions, but I'm hoping that rather then including the variable globally in every class function, there was some way to simply include it into the class/access it in the class. I'm not very good with scoping.

The only option I can think of is to create a class variable and in the constructor, include the variable globally and assign it (maybe by reference, does that make sense?) to the class variable.

Any other options?

I programmed this class for my database handling, maybe its a bit of use to you:

<?php
    class Database {
        public $mysqli;

        function __construct() {
            $this->connect();
        }

        function __wakeup() {
            $this->connect();
        }

        function connect() {
            $mysqli = new mysqli(MYSQL_SERVER, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB);
            if ($mysqli->connect_error) {
                die('Connect Error (' . $mysqli->conect_errno . ')'
                    . $mysqli->connect_error);
            }
            mysqli_set_charset($mysqli, 'utf8');
            $this->mysqli = $mysqli;
        }   

        function queryDB($query) {
            $result = $this->mysqli->query($query);

            if ($this->mysqli->error) {
                error_log("QUERY ERROR: " .$this->mysqli->error);
                error_log("QUERY: " . $query);
            }
            return $result;
        }
    }
?>