AddressRepository.php 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace Lc\ShopBundle\Repository;
  3. use Lc\ShopBundle\Context\AddressInterface;
  4. use Lc\ShopBundle\Context\DefaultRepositoryInterface;
  5. /**
  6. * @method AddressInterface|null find($id, $lockMode = null, $lockVersion = null)
  7. * @method AddressInterface|null findOneBy(array $criteria, array $orderBy = null)
  8. * @method AddressInterface[] findAll()
  9. * @method AddressInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
  10. */
  11. class AddressRepository extends BaseRepository implements DefaultRepositoryInterface
  12. {
  13. public function getInterfaceClass()
  14. {
  15. return AddressInterface::class;
  16. }
  17. // /**
  18. // * @return Address[] Returns an array of Address objects
  19. // */
  20. /*
  21. public function findByExampleField($value)
  22. {
  23. return $this->createQueryBuilder('a')
  24. ->andWhere('a.exampleField = :val')
  25. ->setParameter('val', $value)
  26. ->orderBy('a.id', 'ASC')
  27. ->setMaxResults(10)
  28. ->getQuery()
  29. ->getResult()
  30. ;
  31. }
  32. */
  33. /*
  34. public function findOneBySomeField($value): ?Address
  35. {
  36. return $this->createQueryBuilder('a')
  37. ->andWhere('a.exampleField = :val')
  38. ->setParameter('val', $value)
  39. ->getQuery()
  40. ->getOneOrNullResult()
  41. ;
  42. }
  43. */
  44. }