Advertisement
Guest User

fuu

a guest
Feb 25th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1.     public function process()
  2.     {
  3.         $offre = $this->entityManager->getRepository("OffreBundle:Offres")->find(1);
  4.  
  5.         $candidats = $this->entityManager->getRepository("OffreBundle:Candidatures")->findAll();
  6.  
  7.         $fonctions =
  8.             array('getRegion',
  9.                 );
  10.  
  11.         foreach ($candidats as $candidature) {
  12.  
  13.             $val = 0;
  14.  
  15.             foreach($fonctions as $fonction) $val|=($candidature->{$fonction}() == $offre->{$fonction}());
  16.  
  17.         }
  18.  
  19.         return $val;
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement