ProxyQueryInterface.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. /*
  3. * This file is part of the Sonata Project package.
  4. *
  5. * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  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 Sonata\AdminBundle\Datagrid;
  11. /**
  12. * Interface used by the Datagrid to build the query.
  13. */
  14. interface ProxyQueryInterface
  15. {
  16. /**
  17. * @param array $params
  18. * @param null $hydrationMode
  19. *
  20. * @return mixed
  21. */
  22. public function execute(array $params = array(), $hydrationMode = null);
  23. /**
  24. * @param string $name
  25. * @param array $args
  26. *
  27. * @return mixed
  28. */
  29. public function __call($name, $args);
  30. /**
  31. * @param array $parentAssociationMappings
  32. * @param array $fieldMapping
  33. *
  34. * @return ProxyQueryInterface
  35. */
  36. public function setSortBy($parentAssociationMappings, $fieldMapping);
  37. /**
  38. * @return mixed
  39. */
  40. public function getSortBy();
  41. /**
  42. * @param mixed $sortOrder
  43. *
  44. * @return ProxyQueryInterface
  45. */
  46. public function setSortOrder($sortOrder);
  47. /**
  48. * @return mixed
  49. */
  50. public function getSortOrder();
  51. /**
  52. * @return mixed
  53. */
  54. public function getSingleScalarResult();
  55. /**
  56. * @param int $firstResult
  57. *
  58. * @return ProxyQueryInterface
  59. */
  60. public function setFirstResult($firstResult);
  61. /**
  62. * @return mixed
  63. */
  64. public function getFirstResult();
  65. /**
  66. * @param int $maxResults
  67. *
  68. * @return ProxyQueryInterface
  69. */
  70. public function setMaxResults($maxResults);
  71. /**
  72. * @return mixed
  73. */
  74. public function getMaxResults();
  75. /**
  76. * @return mixed
  77. */
  78. public function getUniqueParameterId();
  79. /**
  80. * @param array $associationMappings
  81. *
  82. * @return mixed
  83. */
  84. public function entityJoin(array $associationMappings);
  85. }