CacheManagerInterface.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace ModulesGarden\ProxmoxAddon\Core\Interfaces;
  3. /**
  4. *
  5. * @author Rafał Ossowski <rafal.os@modulesgarden.com>
  6. */
  7. interface CacheManagerInterface
  8. {
  9. /**
  10. * @param string $key
  11. * @return $this
  12. * @throws \ModulesGarden\ProxmoxAddon\Core\HandlerError\Exceptions\MGModuleException
  13. */
  14. public function setKey($key = 'default');
  15. /**
  16. * @return string
  17. */
  18. public function getKey();
  19. /**
  20. * @param mixed $data
  21. * @return $this
  22. */
  23. public function setData($data = null);
  24. /**
  25. * @return mixed
  26. * @throws \ModulesGarden\ProxmoxAddon\Core\HandlerError\Exceptions\MGModuleException
  27. */
  28. public function getData();
  29. /**
  30. * @return $this
  31. * @throws \ModulesGarden\ProxmoxAddon\Core\HandlerError\Exceptions\MGModuleException
  32. */
  33. public function save();
  34. /**
  35. * @return $this
  36. * @throws \ModulesGarden\ProxmoxAddon\Core\HandlerError\Exceptions\MGModuleException
  37. */
  38. public function remove();
  39. /**
  40. * @return $this
  41. * @throws \ModulesGarden\ProxmoxAddon\Core\HandlerError\Exceptions\MGModuleException
  42. */
  43. public function clearAll();
  44. /**
  45. * @return type
  46. * @throws \ModulesGarden\ProxmoxAddon\Core\HandlerError\Exceptions\MGModuleException
  47. */
  48. public function exist();
  49. }