1
0

IReference.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Collaboration\Reference;
  8. use JsonSerializable;
  9. /**
  10. * @since 25.0.0
  11. */
  12. interface IReference extends JsonSerializable {
  13. /**
  14. * @since 25.0.0
  15. */
  16. public function getId(): string;
  17. /**
  18. * Accessible flag indicates if the user has access to the provided reference
  19. *
  20. * @since 25.0.0
  21. */
  22. public function setAccessible(bool $accessible): void;
  23. /**
  24. * Accessible flag indicates if the user has access to the provided reference
  25. *
  26. * @since 25.0.0
  27. */
  28. public function getAccessible(): bool;
  29. /**
  30. * @since 25.0.0
  31. */
  32. public function setTitle(string $title): void;
  33. /**
  34. * @since 25.0.0
  35. */
  36. public function getTitle(): string;
  37. /**
  38. * @since 25.0.0
  39. */
  40. public function setDescription(?string $description): void;
  41. /**
  42. * @since 25.0.0
  43. */
  44. public function getDescription(): ?string;
  45. /**
  46. * @since 25.0.0
  47. */
  48. public function setImageUrl(?string $imageUrl): void;
  49. /**
  50. * @since 25.0.0
  51. */
  52. public function getImageUrl(): ?string;
  53. /**
  54. * @since 25.0.0
  55. */
  56. public function setImageContentType(?string $contentType): void;
  57. /**
  58. * @since 25.0.0
  59. */
  60. public function getImageContentType(): ?string;
  61. /**
  62. * @since 25.0.0
  63. */
  64. public function setUrl(?string $url): void;
  65. /**
  66. * @since 25.0.0
  67. */
  68. public function getUrl(): string;
  69. /**
  70. * Set the reference specific rich object representation
  71. *
  72. * @since 25.0.0
  73. */
  74. public function setRichObject(string $type, ?array $richObject): void;
  75. /**
  76. * Returns the type of the reference specific rich object
  77. *
  78. * @since 25.0.0
  79. */
  80. public function getRichObjectType(): string;
  81. /**
  82. * Returns the reference specific rich object representation
  83. *
  84. * @since 25.0.0
  85. */
  86. public function getRichObject(): array;
  87. /**
  88. * Returns the opengraph rich object representation
  89. *
  90. * @since 25.0.0
  91. */
  92. public function getOpenGraphObject(): array;
  93. /**
  94. * @return array{richObjectType: string, richObject: array<string, mixed>, openGraphObject: array{id: string, name: string, description: ?string, thumb: ?string, link: string}, accessible: bool}
  95. *
  96. * @since 25.0.0
  97. */
  98. public function jsonSerialize(): array;
  99. }