private function getConnection()
    {
        if ($this->connection) {
            return $this->connection;
        }

        $reflection = new \ReflectionProperty(\Contao\Database::class, 'resConnection');
        $reflection->setAccessible(true);

        return $this->connection = $reflection->getValue($this->getDatabase());
    }