ProxyQueryInterface.php 2.0 KB

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