1
0

ICompositeExpression.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 = []): ICompositeExpression;
  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): ICompositeExpression;
  47. /**
  48. * Retrieves the amount of expressions on composite expression.
  49. *
  50. * @return integer
  51. * @since 8.2.0
  52. */
  53. public function count(): int;
  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(): string;
  61. }