elFinderSessionInterface.php 994 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. *
  26. * This method must be equipped with an automatic start / close.
  27. *
  28. * @param string $key Target key
  29. * @param mixed $empty Return value of if session target key does not exist
  30. *
  31. * @return mixed
  32. **/
  33. public function get($key, $empty = '');
  34. /**
  35. * Set session data
  36. *
  37. * This method must be equipped with an automatic start / close.
  38. *
  39. * @param string $key Target key
  40. * @param mixed $data Value
  41. *
  42. * @return self
  43. **/
  44. public function set($key, $data);
  45. /**
  46. * Get session data
  47. *
  48. * @param string $key Target key
  49. *
  50. * @return self
  51. **/
  52. public function remove($key);
  53. }