1
0

IAccountProperty.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Accounts;
  8. use InvalidArgumentException;
  9. /**
  10. * Interface IAccountProperty
  11. *
  12. * @since 15.0.0
  13. */
  14. interface IAccountProperty extends \JsonSerializable {
  15. /**
  16. * Set the value of a property
  17. *
  18. * @since 15.0.0
  19. *
  20. * @param string $value
  21. * @return IAccountProperty
  22. */
  23. public function setValue(string $value): IAccountProperty;
  24. /**
  25. * Set the scope of a property
  26. *
  27. * @since 15.0.0
  28. *
  29. * @param string $scope
  30. * @psalm-param IAccountManager::SCOPE_* $scope
  31. * @return IAccountProperty
  32. * @throws InvalidArgumentException (since 22.0.0)
  33. */
  34. public function setScope(string $scope): IAccountProperty;
  35. /**
  36. * Set the verification status of a property
  37. *
  38. * @since 15.0.0
  39. *
  40. * @param string $verified
  41. * @return IAccountProperty
  42. */
  43. public function setVerified(string $verified): IAccountProperty;
  44. /**
  45. * Get the name of a property
  46. *
  47. * @since 15.0.0
  48. *
  49. * @return string
  50. */
  51. public function getName(): string;
  52. /**
  53. * Get the value of a property
  54. *
  55. * @since 15.0.0
  56. *
  57. * @return string
  58. */
  59. public function getValue(): string;
  60. /**
  61. * Get the scope of a property
  62. *
  63. * @since 15.0.0
  64. *
  65. * @return string
  66. * @psalm-return IAccountManager::SCOPE_*
  67. */
  68. public function getScope(): string;
  69. /**
  70. * Get the verification status of a property
  71. *
  72. * @since 15.0.0
  73. *
  74. * @return string
  75. */
  76. public function getVerified(): string;
  77. /**
  78. * Sets data for verification purposes.
  79. *
  80. * @since 22.0.0
  81. */
  82. public function setVerificationData(string $verificationData): IAccountProperty;
  83. /**
  84. * Retrieves data for verification purposes.
  85. *
  86. * @since 22.0.0
  87. */
  88. public function getVerificationData(): string;
  89. /**
  90. * Set the instance-based verification status of a property
  91. *
  92. * @since 23.0.0
  93. *
  94. * @param string $verified must be one of the verification constants of IAccountManager
  95. * @return IAccountProperty
  96. * @throws InvalidArgumentException
  97. */
  98. public function setLocallyVerified(string $verified): IAccountProperty;
  99. /**
  100. * Get the instance-based verification status of a property
  101. *
  102. * @since 23.0.0
  103. *
  104. * @return string
  105. */
  106. public function getLocallyVerified(): string;
  107. }