TestPluginSession.php 882 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. declare(strict_types=1);
  3. namespace TestPlugin\Http\Session;
  4. use SessionHandlerInterface;
  5. /**
  6. * Test suite plugin session handler
  7. */
  8. class TestPluginSession implements SessionHandlerInterface
  9. {
  10. /**
  11. * @inheritDoc
  12. */
  13. public function open($path, $name): bool
  14. {
  15. return true;
  16. }
  17. /**
  18. * @inheritDoc
  19. */
  20. public function close(): bool
  21. {
  22. return true;
  23. }
  24. /**
  25. * @inheritDoc
  26. */
  27. #[\ReturnTypeWillChange]
  28. public function read($id)
  29. {
  30. }
  31. /**
  32. * @inheritDoc
  33. */
  34. public function write($id, $data): bool
  35. {
  36. return true;
  37. }
  38. /**
  39. * @inheritDoc
  40. */
  41. public function destroy($id): bool
  42. {
  43. return true;
  44. }
  45. /**
  46. * @inheritDoc
  47. */
  48. #[\ReturnTypeWillChange]
  49. public function gc($maxlifetime)
  50. {
  51. return 0;
  52. }
  53. }