code: public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
      {
          if (PlatformHelper::isWindows()) {
              return $this->connectWindows($params, $username, $password, $driverOptions);
          }
          return $this->connectUnix($params, $username, $password, $driverOptions);
      }
docs: Attempts to establish a connection with the underlying driver.
  
  @param array $params
  @param string $username
  @param string $password
  @param array $driverOptions
  @return \Doctrine\DBAL\Driver\Connection