1
0

IAppContainer.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  6. * SPDX-License-Identifier: AGPL-3.0-only
  7. */
  8. namespace OCP\AppFramework;
  9. use OCP\IContainer;
  10. use Psr\Container\ContainerInterface;
  11. /**
  12. * This is a tagging interface for a container that belongs to an app
  13. *
  14. * The interface currently extends IContainer, but this interface is deprecated as of Nextcloud 20,
  15. * thus this interface won't extend it anymore once that was removed. So migrate to the ContainerInterface
  16. * only.
  17. *
  18. * @deprecated 20.0.0
  19. * @since 6.0.0
  20. */
  21. interface IAppContainer extends ContainerInterface, IContainer {
  22. /**
  23. * used to return the appname of the set application
  24. * @return string the name of your application
  25. * @since 6.0.0
  26. * @deprecated 20.0.0
  27. */
  28. public function getAppName();
  29. /**
  30. * @return \OCP\IServerContainer
  31. * @since 6.0.0
  32. * @deprecated 20.0.0
  33. */
  34. public function getServer();
  35. /**
  36. * @param string $middleWare
  37. * @return boolean
  38. * @since 6.0.0
  39. * @deprecated 20.0.0 use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerMiddleware
  40. */
  41. public function registerMiddleWare($middleWare);
  42. /**
  43. * Register a capability
  44. *
  45. * @param string $serviceName e.g. 'OCA\Files\Capabilities'
  46. * @since 8.2.0
  47. * @deprecated 20.0.0 use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerCapability
  48. */
  49. public function registerCapability($serviceName);
  50. }