public function getTable($name, $caseInsensitive = false)
    {
        if ($this->getSchema() && $this->getPlatform()->supportsSchemas()
            && false === strpos($name, $this->getPlatform()->getSchemaDelimiter())) {
            $name = $this->getSchema() . $this->getPlatform()->getSchemaDelimiter() . $name;
        }

        if (!$this->hasTable($name, $caseInsensitive)) {
            return null;
        }

        if ($caseInsensitive) {
            return $this->tablesByLowercaseName[strtolower($name)];
        }

        return $this->tablesByName[$name];
    }