RepositoryInterface.php 805 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * This file is part of the Sylius package.
  4. *
  5. * (c) Paweł Jędrzejewski
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Sylius\Component\Resource\Repository;
  11. use Doctrine\Common\Persistence\ObjectRepository;
  12. /**
  13. * Model repository interface.
  14. *
  15. * @author Saša Stamenković <umpirsky@gmail.com>
  16. */
  17. interface RepositoryInterface extends ObjectRepository
  18. {
  19. /**
  20. * Create a new resource
  21. *
  22. * @return mixed
  23. */
  24. public function createNew();
  25. /**
  26. * Get paginated collection
  27. *
  28. * @param array $criteria
  29. * @param array $orderBy
  30. *
  31. * @return mixed
  32. */
  33. public function createPaginator(array $criteria = null, array $orderBy = null);
  34. }