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.

IPConfigCache.php 1.6KB

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