> So i want just a solution for get the $uid of the current user inside the default controller class.

Controllers have a [`currentUser`][1] method:

    public function filtrer($firstLetter='', $nbr_ligne='') {
      $current_user_id = $this->currentUser()->id();
    }

[1]: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Controller%21ControllerBase.php/function/ControllerBase%3A%3AcurrentUser/8.4.x