IProviderFactory.php 857 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OCP\Share;
  8. use OC\Share20\Exception\ProviderException;
  9. /**
  10. * Interface IProviderFactory
  11. *
  12. * @since 9.0.0
  13. */
  14. interface IProviderFactory {
  15. /**
  16. * @param string $id
  17. * @return IShareProvider
  18. * @throws ProviderException
  19. * @since 9.0.0
  20. */
  21. public function getProvider($id);
  22. /**
  23. * @param int $shareType
  24. * @return IShareProvider
  25. * @throws ProviderException
  26. * @since 9.0.0
  27. */
  28. public function getProviderForType($shareType);
  29. /**
  30. * @return IShareProvider[]
  31. * @since 11.0.0
  32. */
  33. public function getAllProviders();
  34. /**
  35. * @since 21.0.0
  36. * @param string $shareProvier
  37. */
  38. public function registerProvider(string $shareProvier): void;
  39. }