IEntry.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCP\Contacts\ContactsMenu;
  7. use JsonSerializable;
  8. /**
  9. * @since 12.0
  10. */
  11. interface IEntry extends JsonSerializable {
  12. /**
  13. * @since 12.0
  14. * @return string
  15. */
  16. public function getFullName(): string;
  17. /**
  18. * @since 12.0
  19. * @return string[]
  20. */
  21. public function getEMailAddresses(): array;
  22. /**
  23. * @since 12.0
  24. * @return string|null image URI
  25. */
  26. public function getAvatar(): ?string;
  27. /**
  28. * @since 12.0
  29. * @param IAction $action an action to show in the contacts menu
  30. */
  31. public function addAction(IAction $action): void;
  32. /**
  33. * Set the (system) contact's user status
  34. *
  35. * @since 28.0
  36. * @param string $status
  37. * @param string $statusMessage
  38. * @param string|null $icon
  39. * @return void
  40. */
  41. public function setStatus(string $status,
  42. ?string $statusMessage = null,
  43. ?int $statusMessageTimestamp = null,
  44. ?string $icon = null): void;
  45. /**
  46. * Get an arbitrary property from the contact
  47. *
  48. * @since 12.0
  49. * @param string $key
  50. * @return mixed the value of the property or null
  51. */
  52. public function getProperty(string $key);
  53. }