driver.php 524 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php namespace System\Session;
  2. interface Driver {
  3. /**
  4. * Load a session by ID.
  5. *
  6. * @param string $id
  7. * @return array
  8. */
  9. public function load($id);
  10. /**
  11. * Save a session.
  12. *
  13. * @param array $session
  14. * @return void
  15. */
  16. public function save($session);
  17. /**
  18. * Delete a session by ID.
  19. *
  20. * @param string $id
  21. * @return void
  22. */
  23. public function delete($id);
  24. /**
  25. * Delete all expired sessions.
  26. *
  27. * @param int $expiration
  28. * @return void
  29. */
  30. public function sweep($expiration);
  31. }