iappcontainer.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. */
  33. interface IAppContainer extends IContainer {
  34. /**
  35. * used to return the appname of the set application
  36. * @return string the name of your application
  37. */
  38. function getAppName();
  39. /**
  40. * @deprecated implements only deprecated methods
  41. * @return IApi
  42. */
  43. function getCoreApi();
  44. /**
  45. * @return \OCP\IServerContainer
  46. */
  47. function getServer();
  48. /**
  49. * @param string $middleWare
  50. * @return boolean
  51. */
  52. function registerMiddleWare($middleWare);
  53. /**
  54. * @deprecated use IUserSession->isLoggedIn()
  55. * @return boolean
  56. */
  57. function isLoggedIn();
  58. /**
  59. * @deprecated use IGroupManager->isAdmin($userId)
  60. * @return boolean
  61. * @deprecated use the groupmanager instead to find out if the user is in
  62. * the admin group
  63. */
  64. function isAdminUser();
  65. /**
  66. * @deprecated use the ILogger instead
  67. * @param string $message
  68. * @param string $level
  69. * @return mixed
  70. */
  71. function log($message, $level);
  72. }