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
535B

  1. <?php
  2. namespace Lc\SovBundle\Repository;
  3. use Lc\SovBundle\Model\Site\PageInterface;
  4. abstract class AbstractStore
  5. {
  6. public function createQuery($query = null)
  7. {
  8. if (is_null($query)) {
  9. $query = $this->query->create();
  10. }
  11. return $query;
  12. }
  13. public function getRepositoryQuery()
  14. {
  15. return $this->query;
  16. }
  17. public function getOneById(int $id)
  18. {
  19. $query = $this->query->create();
  20. $query->filterById($id);
  21. return $query->findOne();
  22. }
  23. }