1
0

ICompositeExpression.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Joas Schilling <coding@schilljs.com>
  6. * @author Roeland Jago Douma <roeland@famdouma.nl>
  7. *
  8. * @license AGPL-3.0
  9. *
  10. * This code is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU Affero General Public License, version 3,
  12. * as published by the Free Software Foundation.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU Affero General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Affero General Public License, version 3,
  20. * along with this program. If not, see <http://www.gnu.org/licenses/>
  21. *
  22. */
  23. namespace OCP\DB\QueryBuilder;
  24. /**
  25. * This class provides a wrapper around Doctrine's CompositeExpression
  26. * @since 8.2.0
  27. */
  28. interface ICompositeExpression {
  29. /**
  30. * Adds multiple parts to composite expression.
  31. *
  32. * @param array $parts
  33. *
  34. * @return ICompositeExpression
  35. * @since 8.2.0
  36. */
  37. public function addMultiple(array $parts = array());
  38. /**
  39. * Adds an expression to composite expression.
  40. *
  41. * @param mixed $part
  42. *
  43. * @return ICompositeExpression
  44. * @since 8.2.0
  45. */
  46. public function add($part);
  47. /**
  48. * Retrieves the amount of expressions on composite expression.
  49. *
  50. * @return integer
  51. * @since 8.2.0
  52. */
  53. public function count();
  54. /**
  55. * Returns the type of this composite expression (AND/OR).
  56. *
  57. * @return string
  58. * @since 8.2.0
  59. */
  60. public function getType();
  61. }