public static function get($id = null)
    {
        if ($id === null && static::$activeDatabaseConnection === null) {
            throw new MissingDatabaseConnectionException('No databases defined.');
        }

        if ($id === null) {
            return static::$databaseConnections[static::$activeDatabaseConnection];
        } else {
            return static::$databaseConnections[$id];
        }
    }
public static function get($id = null)
    {
        if ($id === null && static::$activeDatabaseConnection === null) {
            throw new MissingDatabaseConnectionException('No databases defined.');
        }

        if ($id === null) {
            return static::$databaseConnections[static::$activeDatabaseConnection];
        } else {
            return static::$databaseConnections[$id];
        }
    }
public static function get ( $ id = null ) { if ( $ id === null && static :: $ activeDatabaseConnection === null ) { throw new MissingDatabaseConnectionException ( 'No databases defined.' ) ; } if ( $ id === null ) { return static :: $ databaseConnections [ static :: $ activeDatabaseConnection ] ; } else { return static :: $ databaseConnections [ $ id ] ; } }
Get a database connection.
@param  null $id
@return IDatabaseConnection
@throws MissingDatabaseConnectionException
Get a database connection .