Shortcode callback for add_action(‘wp_footer’)

each time you call the shortcode function, you overwrite the previous script var with the current version. make it an array instead of a string:

self::$var[] = $script;

and then output with foreach:

public static function footer() 
{
    foreach( self::$var as $script ){
        echo $script;
    }
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)