Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IConfigCache.php 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. namespace Friendica\Core\Config\Cache;
  3. /**
  4. * The interface for a system-wide ConfigCache
  5. */
  6. interface IConfigCache
  7. {
  8. /**
  9. * Tries to load the specified configuration array into the config array.
  10. * Doesn't overwrite previously set values by default to prevent default config files to supersede DB Config.
  11. *
  12. * @param array $config
  13. * @param bool $overwrite Force value overwrite if the config key already exists
  14. */
  15. function load(array $config, $overwrite = false);
  16. /**
  17. * Gets a value from the config cache.
  18. *
  19. * @param string $cat Config category
  20. * @param string $key Config key
  21. *
  22. * @return mixed Returns the value of the Config entry or '!<unset>!' if not set
  23. */
  24. function get($cat, $key = null);
  25. /**
  26. * Sets a value in the config cache. Accepts raw output from the config table
  27. *
  28. * @param string $cat Config category
  29. * @param string $key Config key
  30. * @param mixed $value Value to set
  31. *
  32. * @return bool True, if the value is set
  33. */
  34. function set($cat, $key, $value);
  35. /**
  36. * Deletes a value from the config cache.
  37. *
  38. * @param string $cat Config category
  39. * @param string $key Config key
  40. *
  41. * @return bool true, if deleted
  42. */
  43. function delete($cat, $key);
  44. /**
  45. * Checks if a value is set in the config cache.
  46. *
  47. * @param string $cat Config category
  48. * @param string $key Config key
  49. * @return bool
  50. */
  51. function has($cat, $key = null);
  52. /**
  53. * Returns the whole configuration cache
  54. *
  55. * @return array
  56. */
  57. function getAll();
  58. }