connection = $connection; $this->defaultConnectionName = $defaultConnectionName; } public function getDefaultConnection(): Connection { return $this->connection; } public function getConnection(string $name): Connection { if ($name !== $this->defaultConnectionName) { throw new ConnectionNotFound(sprintf('Connection with name "%s" does not exist.', $name)); } return $this->connection; } }