iappcontainer.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * @author Bernhard Posselt <dev@bernhard-posselt.com>
  4. * @author Jörn Friedrich Dreyer <jfd@butonic.de>
  5. * @author Morris Jobke <hey@morrisjobke.de>
  6. * @author Thomas Müller <thomas.mueller@tmit.eu>
  7. *
  8. * @copyright Copyright (c) 2015, ownCloud, Inc.
  9. * @license AGPL-3.0
  10. *
  11. * This code is free software: you can redistribute it and/or modify
  12. * it under the terms of the GNU Affero General Public License, version 3,
  13. * as published by the Free Software Foundation.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License, version 3,
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>
  22. *
  23. */
  24. namespace OCP\AppFramework;
  25. use OCP\AppFramework\IApi;
  26. use OCP\IContainer;
  27. /**
  28. * Class IAppContainer
  29. * @package OCP\AppFramework
  30. *
  31. * This container interface provides short cuts for app developers to access predefined app service.
  32. * @since 6.0.0
  33. */
  34. interface IAppContainer extends IContainer {
  35. /**
  36. * used to return the appname of the set application
  37. * @return string the name of your application
  38. * @since 6.0.0
  39. */
  40. function getAppName();
  41. /**
  42. * @deprecated 8.0.0 implements only deprecated methods
  43. * @return IApi
  44. * @since 6.0.0
  45. */
  46. function getCoreApi();
  47. /**
  48. * @return \OCP\IServerContainer
  49. * @since 6.0.0
  50. */
  51. function getServer();
  52. /**
  53. * @param string $middleWare
  54. * @return boolean
  55. * @since 6.0.0
  56. */
  57. function registerMiddleWare($middleWare);
  58. /**
  59. * @deprecated 8.0.0 use IUserSession->isLoggedIn()
  60. * @return boolean
  61. * @since 6.0.0
  62. */
  63. function isLoggedIn();
  64. /**
  65. * @deprecated 8.0.0 use IGroupManager->isAdmin($userId)
  66. * @return boolean
  67. * @since 6.0.0
  68. */
  69. function isAdminUser();
  70. /**
  71. * @deprecated 8.0.0 use the ILogger instead
  72. * @param string $message
  73. * @param string $level
  74. * @return mixed
  75. * @since 6.0.0
  76. */
  77. function log($message, $level);
  78. }