Rocketeer\Services\Connections\ConnectionsHandler::setConnection PHP Метод

setConnection() публичный Метод

Set the current connection.
public setConnection ( string $connection, integer $server )
$connection string
$server integer
    public function setConnection($connection, $server = 0)
    {
        if (!$this->isValidConnection($connection) || $this->connection === $connection && $this->currentServer === $server) {
            return;
        }
        // Set the connection
        $this->handle = null;
        $this->connection = $connection;
        $this->localStorage = $server;
        $this->currentServer = $server;
        // Update events
        $this->tasks->registerConfiguredEvents();
    }