src/Database/ConnectionCollection.php
public static function setDefault($connectionName, $force = true)
    {
        if ($force === false && self::existsDefault() === true) {
            throw new Exception('A default Datasource is already defined.');
            return false;
        } else {
            self::$defaultConnectionName = $connectionName;
            return true;
        }
    }
public static function setDefault($connectionName, $force = true)
    {
        if ($force === false && self::existsDefault() === true) {
            throw new Exception('A default Datasource is already defined.');
            return false;
        } else {
            self::$defaultConnectionName = $connectionName;
            return true;
        }
    }
public static function setDefault ( $ connectionName , $ force = true ) { if ( $ force === false && self :: existsDefault ( ) === true ) { throw new Exception ( 'A default Datasource is already defined.' ) ; return false ; } else { self :: $ defaultConnectionName = $ connectionName ; return true ; } }
Set default connection

Set default connection name and can force it set

@since   1.0
@param   string $connectionName Connection name who will be set by default.
@param   bool $force Force change of default connection.
@return  bool Return true if success or false if error.
Set default connection