58 lines
1.3KB

  1. <?php
  2. namespace Lc\SovBundle\Repository\File;
  3. use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
  4. use Doctrine\ORM\QueryBuilder;
  5. use Lc\SovBundle\Doctrine\EntityInterface;
  6. interface FileRepositoryQueryInterface
  7. {
  8. public function create();
  9. public function call(callable $fn);
  10. public function count();
  11. public function findOne();
  12. public function find(): array;
  13. public function limit(int $maxResults);
  14. public function paginate(int $page = 1, int $limit = 20);
  15. public function getRepository(): ServiceEntityRepository;
  16. public function getQueryBuilder(): QueryBuilder;
  17. public function groupBy(string $field);
  18. public function orderBy(string $field, string $sort = 'ASC');
  19. public function filterById(int $id);
  20. public function andWhereEqual($field, $value);
  21. public function filterByOldUrl(string $oldUrl);
  22. public function resetRelationsJoin(): void;
  23. public function filterByDevAlias(string $devAlias);
  24. public function filterBySlug(string $slug);
  25. public function filterIsParent();
  26. public function filterIsChildren();
  27. public function filterByParent(EntityInterface $parent = null);
  28. public function filterIsOffline();
  29. public function filterIsOnline();
  30. public function filterIsDeleted();
  31. public function filterIsOnlineAndOffline();
  32. }