You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
627B

  1. <?php
  2. namespace Lc\SovBundle\Repository\Reminder;
  3. /**
  4. * class ReminderStore.
  5. *
  6. * @author Simon Vieille <simon@deblan.fr>
  7. */
  8. class ReminderStore
  9. {
  10. protected ReminderRepositoryQuery $query;
  11. public function __construct(ReminderRepositoryQuery $query)
  12. {
  13. $this->query = $query;
  14. }
  15. public function getFoo($query = null)
  16. {
  17. if (!$query) {
  18. $query = $this->query->create();
  19. }
  20. return $query
  21. ->useCustomFilters()
  22. ->andWhere('.description = :description')
  23. ->setParameter(':description', 'ahah')
  24. ->findOne();
  25. }
  26. }