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.

IConfigAdapter.php 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. namespace Friendica\Core\Config\Adapter;
  3. /**
  4. *
  5. * @author Hypolite Petovan <hypolite@mrpetovan.com>
  6. */
  7. interface IConfigAdapter
  8. {
  9. /**
  10. * Loads all configuration values into a cached storage.
  11. *
  12. * @param string $cat The category of the configuration values to load
  13. *
  14. * @return array
  15. */
  16. public function load($cat = "config");
  17. /**
  18. * Get a particular user's config variable given the category name
  19. * ($family) and a key.
  20. *
  21. * @param string $cat The category of the configuration value
  22. * @param string $key The configuration key to query
  23. *
  24. * @return mixed Stored value or "!<unset>!" if it does not exist
  25. */
  26. public function get($cat, $key);
  27. /**
  28. * Stores a config value ($value) in the category ($family) under the key ($key)
  29. * for the user_id $uid.
  30. *
  31. * Note: Please do not store booleans - convert to 0/1 integer values!
  32. *
  33. * @param string $cat The category of the configuration value
  34. * @param string $key The configuration key to set
  35. * @param mixed $value The value to store
  36. *
  37. * @return bool Operation success
  38. */
  39. public function set($cat, $key, $value);
  40. /**
  41. * Removes the configured value from the stored cache
  42. * and removes it from the database.
  43. *
  44. * @param string $cat The category of the configuration value
  45. * @param string $key The configuration key to delete
  46. *
  47. * @return mixed
  48. */
  49. public function delete($cat, $key);
  50. /**
  51. * Checks, if the current adapter is connected to the backend
  52. *
  53. * @return bool
  54. */
  55. public function isConnected();
  56. }