IAppContainer.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Bernhard Posselt <dev@bernhard-posselt.com>
  6. * @author Jörn Friedrich Dreyer <jfd@butonic.de>
  7. * @author Morris Jobke <hey@morrisjobke.de>
  8. * @author Roeland Jago Douma <roeland@famdouma.nl>
  9. * @author Thomas Müller <thomas.mueller@tmit.eu>
  10. *
  11. * @license AGPL-3.0
  12. *
  13. * This code is free software: you can redistribute it and/or modify
  14. * it under the terms of the GNU Affero General Public License, version 3,
  15. * as published by the Free Software Foundation.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU Affero General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Affero General Public License, version 3,
  23. * along with this program. If not, see <http://www.gnu.org/licenses/>
  24. *
  25. */
  26. namespace OCP\AppFramework;
  27. use OCP\IContainer;
  28. /**
  29. * Class IAppContainer
  30. * @package OCP\AppFramework
  31. *
  32. * This container interface provides short cuts for app developers to access predefined app service.
  33. * @since 6.0.0
  34. */
  35. interface IAppContainer extends IContainer {
  36. /**
  37. * used to return the appname of the set application
  38. * @return string the name of your application
  39. * @since 6.0.0
  40. */
  41. public function getAppName();
  42. /**
  43. * @return \OCP\IServerContainer
  44. * @since 6.0.0
  45. */
  46. public function getServer();
  47. /**
  48. * @param string $middleWare
  49. * @return boolean
  50. * @since 6.0.0
  51. */
  52. public function registerMiddleWare($middleWare);
  53. /**
  54. * Register a capability
  55. *
  56. * @param string $serviceName e.g. 'OCA\Files\Capabilities'
  57. * @since 8.2.0
  58. */
  59. public function registerCapability($serviceName);
  60. }