public function getTable($name, $caseInsensitive = false)
    {
        if ($this->hasTable($name, $caseInsensitive)) {
            if ($caseInsensitive) {
                return $this->tablesByLowercaseName[strtolower($name)];
            } else {
                return $this->tablesByName[$name];
            }
        }

        return null; // just to be explicit
    }