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

		if(isset($this->connections[$connection]))
		{
			if(method_exists($this->connections[$connection], 'close'))
			{
				// Call close on the connection object in case there's a reference
				// to the connection that won't be garbage collected immediately

				$this->connections[$connection]->close();
			}

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

		if(isset($this->connections[$connection]))
		{
			if(method_exists($this->connections[$connection], 'close'))
			{
				// Call close on the connection object in case there's a reference
				// to the connection that won't be garbage collected immediately

				$this->connections[$connection]->close();
			}

			unset($this->connections[$connection]);
		}
	}
public function close ( ? string $ connection = null ) : void { $ connection = $ connection ?? $ this -> default ; if ( isset ( $ this -> connections [ $ connection ] ) ) { if ( method_exists ( $ this -> connections [ $ connection ] , 'close' ) ) { // Call close on the connection object in case there's a reference // to the connection that won't be garbage collected immediately $ this -> connections [ $ connection ] -> close ( ) ; } unset ( $ this -> connections [ $ connection ] ) ; } }
Closes the chosen connection.

@param string|null $connection Connection name
Closes the chosen connection .