public static function getDefaultConnection()
    {
        if (self::$defaultConnection === null) {
            $databaseSettings = StemSettings::singleton();

            self::$defaultConnection = static::getConnection($databaseSettings);

            if ($databaseSettings->stickyWriteConnection) {
                self::$readOnlyConnection = self::$defaultConnection;
            }
        }

        return self::$defaultConnection;
    }
public static function getDefaultConnection()
    {
        if (self::$defaultConnection === null) {
            $databaseSettings = StemSettings::singleton();

            self::$defaultConnection = static::getConnection($databaseSettings);

            if ($databaseSettings->stickyWriteConnection) {
                self::$readOnlyConnection = self::$defaultConnection;
            }
        }

        return self::$defaultConnection;
    }
public static function getDefaultConnection ( ) { if ( self :: $ defaultConnection === null ) { $ databaseSettings = StemSettings :: singleton ( ) ; self :: $ defaultConnection = static :: getConnection ( $ databaseSettings ) ; if ( $ databaseSettings -> stickyWriteConnection ) { self :: $ readOnlyConnection = self :: $ defaultConnection ; } } return self :: $ defaultConnection ; }
Return's the default connection.
Return s the default connection .