mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
60 lines
1.7 KiB
PHP
60 lines
1.7 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Chill is a software for social workers
|
|
*
|
|
* For the full copyright and license information, please view
|
|
* the LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Chill\MainBundle\Repository;
|
|
|
|
use Chill\MainBundle\Entity\ResidentialAddress;
|
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
|
use Doctrine\Persistence\ManagerRegistry;
|
|
|
|
/**
|
|
* @method ResidentialAddress|null find($id, $lockMode = null, $lockVersion = null)
|
|
* @method ResidentialAddress|null findOneBy(array $criteria, array $orderBy = null)
|
|
* @method ResidentialAddress[] findAll()
|
|
* @method ResidentialAddress[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
|
*/
|
|
class ResidentialAddressRepository extends ServiceEntityRepository
|
|
{
|
|
public function __construct(ManagerRegistry $registry)
|
|
{
|
|
parent::__construct($registry, ResidentialAddress::class);
|
|
}
|
|
|
|
// /**
|
|
// * @return ResidentialAddress[] Returns an array of ResidentialAddress objects
|
|
// */
|
|
/*
|
|
public function findByExampleField($value)
|
|
{
|
|
return $this->createQueryBuilder('r')
|
|
->andWhere('r.exampleField = :val')
|
|
->setParameter('val', $value)
|
|
->orderBy('r.id', 'ASC')
|
|
->setMaxResults(10)
|
|
->getQuery()
|
|
->getResult()
|
|
;
|
|
}
|
|
*/
|
|
|
|
/*
|
|
public function findOneBySomeField($value): ?ResidentialAddress
|
|
{
|
|
return $this->createQueryBuilder('r')
|
|
->andWhere('r.exampleField = :val')
|
|
->setParameter('val', $value)
|
|
->getQuery()
|
|
->getOneOrNullResult()
|
|
;
|
|
}
|
|
*/
|
|
}
|