for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace AppBundle\Repository;
/**
* CustomerRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class CustomerRepository extends \Doctrine\ORM\EntityRepository
{
public function findUsernameByApiKey($param){
return $this->createQueryBuilder('c')
->select('c.username, c.id')
->where('c.apiKey =: param')
->setParameter(':param', $param)
->getQuery()
->getResult();
}
public function findUserByFacebook($param)
return $this->createQueryBuilder('customer')
->select('customer.id, customer.username, customer.facebookID')
->where('customer.facebookID= :param')