title: get PHP function (Symfony 4.2)
body: <p>I have the following error that I do not understand:
  &quot;Attempted to call function &quot;pasPointer&quot; from namespace &quot;App\Controller&quot;.&quot;
  The code that goes with it:</p>
  <pre><code>public function emargementsParCours(EntityManagerInterface $em, Request $request): Response
  {
    $session = $this-&gt;get('session');
    $user = $this-&gt;getUser();
    $teacherId = $user-&gt;getId();
    $idCours = $request-&gt;get('idCours');
    //dd($idCours);
    $utilisateurEtudiant = $this-&gt;getDoctrine()-&gt;getRepository(Utilisateur::class)-&gt;find($user);
  
    $listeDePointage = $em-&gt;getRepository(ProfCours::class)-&gt;findHorairesParCours($em, $teacherId, $idCours);
  
  
    return $this-&gt;render('profEmargementsParCours.twig', array(
                                                       'listeDePointage' =&gt; $listeDePointage,
                                                       'prenom' =&gt; $user-&gt;getPrenomUtilisateur(), 
                                                       'nom' =&gt; $user-&gt;getNomUtilisateur()));
  }
  
  public function listeEmargementsPassesParCours(EntityManagerInterface $em, Request $request): Response
  {
    $pasdePointage = pasPointer($idCours, $idDate, $idCreneau);
  
    return $this-&gt;render('panelProfListeEmargements.twig', array(
                                                       'pasdePointage' =&gt; $pasdePointage,
                                                       'prenom' =&gt; $user-&gt;getPrenomUtilisateur(), 
                                                       'nom' =&gt; $user-&gt;getNomUtilisateur()));
  }
  
  // function called
  public function pasPointer($idCours, $idDate, $idCreneau) { 
  // SQL function executed
      $requestPasPointer = &quot;SELECT ec.etudiant
      FROM etudiant_cours ec
      left JOIN pointage po 
          inner JOIN utilisateur u 
             on u.id = po.utilisateur_etudiant_id
          inner JOIN cours_planning cp 
             on cp.id = po.cours_id 
            and cp.cours = :conditions_particulieres_generales_client
            and cp.plage_horaire_id = :conditions_particulieres_generales_client
            and cp.date_cours = :conditions_particulieres_generales_client
        ON po.utilisateur_etudiant_id = ec.etudiant
      where po.utilisateur_etudiant_id is null&quot;;              
      $exectPasPointer = $bdd-&gt;prepare( $requestPasPointer );
      $exectPasPointer-&gt;execute( array( 
      ':idCours' =&gt; $idCours,
      ':idDate' =&gt; $idDate,
      ':idCreneau' =&gt; $idCreneau
      ));
  }
  </code></pre>
  <p>I want to get the result of the function, but i don't understand this error. The functions are in the same Controller, i do a simple call.
  and idea? thank you!</p>