src/Database/ConnectionCollection.php
public static function add($connection, $setAsDefault = false)
    {
        $connectionName = $connection->getName();
        self::$connectionList[$connectionName] = $connection;
        if ($setAsDefault === true) {
            self::setDefault($connectionName);
        }
    }
public static function add($connection, $setAsDefault = false)
    {
        $connectionName = $connection->getName();
        self::$connectionList[$connectionName] = $connection;
        if ($setAsDefault === true) {
            self::setDefault($connectionName);
        }
    }
public static function add ( $ connection , $ setAsDefault = false ) { $ connectionName = $ connection -> getName ( ) ; self :: $ connectionList [ $ connectionName ] = $ connection ; if ( $ setAsDefault === true ) { self :: setDefault ( $ connectionName ) ; } }
Add a connection to collection

Store Connection to collection and defined it by default if would

@since   1.0
@param   \Pabana\Database\Connection $connection Object defined a connection and its parameters.
@param   bool $setAsDefault If defined connection will be defined as default connection.
@return  void
Add a connection to collection