elFinderSessionInterface.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * elFinder - file manager for web.
  4. * Session Wrapper Interface.
  5. *
  6. * @package elfinder
  7. * @author Naoki Sawada
  8. **/
  9. interface elFinderSessionInterface
  10. {
  11. /**
  12. * Session start
  13. *
  14. * @return self
  15. **/
  16. public function start();
  17. /**
  18. * Session write & close
  19. *
  20. * @return self
  21. **/
  22. public function close();
  23. /**
  24. * Get session data
  25. * This method must be equipped with an automatic start / close.
  26. *
  27. * @param string $key Target key
  28. * @param mixed $empty Return value of if session target key does not exist
  29. *
  30. * @return mixed
  31. **/
  32. public function get($key, $empty = '');
  33. /**
  34. * Set session data
  35. * This method must be equipped with an automatic start / close.
  36. *
  37. * @param string $key Target key
  38. * @param mixed $data Value
  39. *
  40. * @return self
  41. **/
  42. public function set($key, $data);
  43. /**
  44. * Get session data
  45. *
  46. * @param string $key Target key
  47. *
  48. * @return self
  49. **/
  50. public function remove($key);
  51. }