SessionHandlerInterface.php 891 B

1234567891011121314151617181920212223
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: liu21st <liu21st@gmail.com>
  10. // +----------------------------------------------------------------------
  11. declare (strict_types = 1);
  12. namespace think\contract;
  13. /**
  14. * Session驱动接口
  15. */
  16. interface SessionHandlerInterface
  17. {
  18. public function read(string $sessionId): string;
  19. public function delete(string $sessionId): bool;
  20. public function write(string $sessionId, string $data): bool;
  21. }