src/Leevel/Manager/Manager.php
public function connect($options = null): object
    {
        list($options, $unique) = $this->parseOptionAndUnique($options);

        if (isset($this->connects[$unique])) {
            return $this->connects[$unique];
        }

        $driver = $options['driver'] ?? $this->getDefaultDriver();

        return $this->connects[$unique] = $this->makeConnect(
            $driver, $options
        );
    }
public function connect($options = null): object
    {
        list($options, $unique) = $this->parseOptionAndUnique($options);

        if (isset($this->connects[$unique])) {
            return $this->connects[$unique];
        }

        $driver = $options['driver'] ?? $this->getDefaultDriver();

        return $this->connects[$unique] = $this->makeConnect(
            $driver, $options
        );
    }
连接 connect 并返回连接对象

@param null|array|string $options

@return object