iconfig.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * Copyright (c) 2013 Bart Visscher <bartv@thisnet.nl>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. *
  8. */
  9. namespace OCP;
  10. /**
  11. * Access to all the configuration options ownCloud offers
  12. */
  13. interface IConfig {
  14. /**
  15. * Sets a new system wide value
  16. * @param string $key the key of the value, under which will be saved
  17. * @param string $value the value that should be stored
  18. * @todo need a use case for this
  19. */
  20. // public function setSystemValue($key, $value);
  21. /**
  22. * Looks up a system wide defined value
  23. * @param string $key the key of the value, under which it was saved
  24. * @return string the saved value
  25. */
  26. public function getSystemValue($key);
  27. /**
  28. * Writes a new app wide value
  29. * @param string $appName the appName that we want to store the value under
  30. * @param string $key the key of the value, under which will be saved
  31. * @param string $value the value that should be stored
  32. */
  33. public function setAppValue($appName, $key, $value);
  34. /**
  35. * Looks up an app wide defined value
  36. * @param string $appName the appName that we stored the value under
  37. * @param string $key the key of the value, under which it was saved
  38. * @return string the saved value
  39. */
  40. public function getAppValue($appName, $key);
  41. /**
  42. * Set a user defined value
  43. * @param string $userId the userId of the user that we want to store the value under
  44. * @param string $appName the appName that we want to store the value under
  45. * @param string $key the key under which the value is being stored
  46. * @param string $value the value that you want to store
  47. */
  48. public function setUserValue($userId, $appName, $key, $value);
  49. /**
  50. * Shortcut for getting a user defined value
  51. * @param string $userId the userId of the user that we want to store the value under
  52. * @param string $appName the appName that we stored the value under
  53. * @param string $key the key under which the value is being stored
  54. */
  55. public function getUserValue($userId, $appName, $key);
  56. }