1
0

IAppContainer.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2016, ownCloud, Inc.
  5. *
  6. * @author Bernhard Posselt <dev@bernhard-posselt.com>
  7. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  8. * @author Morris Jobke <hey@morrisjobke.de>
  9. * @author Roeland Jago Douma <roeland@famdouma.nl>
  10. * @author Thomas Müller <thomas.mueller@tmit.eu>
  11. *
  12. * @license AGPL-3.0
  13. *
  14. * This code is free software: you can redistribute it and/or modify
  15. * it under the terms of the GNU Affero General Public License, version 3,
  16. * as published by the Free Software Foundation.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU Affero General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU Affero General Public License, version 3,
  24. * along with this program. If not, see <http://www.gnu.org/licenses/>
  25. *
  26. */
  27. namespace OCP\AppFramework;
  28. use OCP\IContainer;
  29. use Psr\Container\ContainerInterface;
  30. /**
  31. * This is a tagging interface for a container that belongs to an app
  32. *
  33. * The interface currently extends IContainer, but this interface is deprecated as of Nextcloud 20,
  34. * thus this interface won't extend it anymore once that was removed. So migrate to the ContainerInterface
  35. * only.
  36. *
  37. * @deprecated 20.0.0
  38. * @since 6.0.0
  39. */
  40. interface IAppContainer extends ContainerInterface, IContainer {
  41. /**
  42. * used to return the appname of the set application
  43. * @return string the name of your application
  44. * @since 6.0.0
  45. * @deprecated 20.0.0
  46. */
  47. public function getAppName();
  48. /**
  49. * @return \OCP\IServerContainer
  50. * @since 6.0.0
  51. * @deprecated 20.0.0
  52. */
  53. public function getServer();
  54. /**
  55. * @param string $middleWare
  56. * @return boolean
  57. * @since 6.0.0
  58. * @deprecated 20.0.0 use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerMiddleware
  59. */
  60. public function registerMiddleWare($middleWare);
  61. /**
  62. * Register a capability
  63. *
  64. * @param string $serviceName e.g. 'OCA\Files\Capabilities'
  65. * @since 8.2.0
  66. * @deprecated 20.0.0 use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerCapability
  67. */
  68. public function registerCapability($serviceName);
  69. }