Syntax issue on rest object’s callback

The callback has to be public:

public function respondWithString()

And in your register_rest_route() call, set the callback to [ $this, 'respondWithString' ]:

register_rest_route( $this->urlBase, 'dummy', [
  'methods'  => 'GET',
  'callback' => [ $this, 'respondWithString' ],
] );

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