IAddress.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Mail\Provider;
  8. /**
  9. * Mail Address Interface
  10. *
  11. * This interface is a base requirement of methods and functionality used to construct a mail address object
  12. *
  13. * @since 30.0.0
  14. *
  15. */
  16. interface IAddress {
  17. /**
  18. * sets the mail address
  19. *
  20. * @since 30.0.0
  21. *
  22. * @param string $value mail address (test@example.com)
  23. *
  24. * @return self return this object for command chaining
  25. */
  26. public function setAddress(string $value): self;
  27. /**
  28. * gets the mail address
  29. *
  30. * @since 30.0.0
  31. *
  32. * @return string returns the mail address
  33. */
  34. public function getAddress(): string|null;
  35. /**
  36. * sets the mail address label/name
  37. *
  38. * @since 30.0.0
  39. *
  40. * @param string $value mail address label/name
  41. *
  42. * @return self return this object for command chaining
  43. */
  44. public function setLabel(string $value): self;
  45. /**
  46. * gets the mail address label/name
  47. *
  48. * @since 30.0.0
  49. *
  50. * @return string returns the mail address label/name
  51. */
  52. public function getLabel(): string|null;
  53. }