ProxyQueryInterface.php 2.0 KB

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