You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.6 KiB

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