TestAppLibSession.php 985 B

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