src/mako/common/ConnectionManager.php
public function connection(?string $connection = null)
	{
		$connection = $connection ?? $this->default;

		if(!isset($this->connections[$connection]))
		{
			$this->connections[$connection] = $this->connect($connection);
		}

		return $this->connections[$connection];
	}
public function connection(?string $connection = null)
	{
		$connection = $connection ?? $this->default;

		if(!isset($this->connections[$connection]))
		{
			$this->connections[$connection] = $this->connect($connection);
		}

		return $this->connections[$connection];
	}
public function connection ( ? string $ connection = null ) { $ connection = $ connection ?? $ this -> default ; if ( ! isset ( $ this -> connections [ $ connection ] ) ) { $ this -> connections [ $ connection ] = $ this -> connect ( $ connection ) ; } return $ this -> connections [ $ connection ] ; }
Returns the chosen connection.

@param  string|null $connection Connection name
@return mixed
Returns the chosen connection .