]> Raphaƫl G. Git Repositories - airbundle/blob - Repository/ApplicationRepository.php
New page title and description schema
[airbundle] / Repository / ApplicationRepository.php
1 <?php
2
3 namespace Rapsys\AirBundle\Repository;
4
5 /**
6 * ApplicationRepository
7 */
8 class ApplicationRepository extends \Doctrine\ORM\EntityRepository {
9 /**
10 * Find session by session and user
11 *
12 * @param $session The session
13 * @param $user The user
14 */
15 public function findOneBySessionUser($session, $user) {
16 //Fetch article
17 $ret = $this->getEntityManager()
18 ->createQuery('SELECT a FROM RapsysAirBundle:Application a WHERE (a.session = :session AND a.user = :user)')
19 ->setParameter('session', $session)
20 ->setParameter('user', $user)
21 ->getSingleResult();
22
23 //Send result
24 return $ret;
25 }
26 }