SessionConnectionInterface.php 1017 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace Aws\DynamoDb;
  3. /**
  4. * The session connection provides the underlying logic for interacting with
  5. * Amazon DynamoDB and performs all of the reading and writing operations.
  6. */
  7. interface SessionConnectionInterface
  8. {
  9. /**
  10. * Reads session data from DynamoDB
  11. *
  12. * @param string $id Session ID
  13. *
  14. * @return array
  15. */
  16. public function read($id);
  17. /**
  18. * Writes session data to DynamoDB
  19. *
  20. * @param string $id Session ID
  21. * @param string $data Serialized session data
  22. * @param bool $isChanged Whether or not the data has changed
  23. *
  24. * @return bool
  25. */
  26. public function write($id, $data, $isChanged);
  27. /**
  28. * Deletes session record from DynamoDB
  29. *
  30. * @param string $id Session ID
  31. *
  32. * @return bool
  33. */
  34. public function delete($id);
  35. /**
  36. * Performs garbage collection on the sessions stored in the DynamoDB
  37. *
  38. * @return bool
  39. */
  40. public function deleteExpired();
  41. }