1 | <?php |
||
36 | class SessionHandler |
||
37 | { |
||
38 | use SessionRequestAwareTrait; |
||
39 | |||
40 | /** |
||
41 | * Session factory |
||
42 | * |
||
43 | * @var SessionFactory |
||
44 | * |
||
45 | * @access protected |
||
46 | */ |
||
47 | protected $sessionFactory; |
||
48 | |||
49 | /** |
||
50 | * Create a session handler |
||
51 | * |
||
52 | * @param SessionFactory $sessionFactory Session factory |
||
53 | * |
||
54 | * @access public |
||
55 | */ |
||
56 | 1 | public function __construct(SessionFactory $sessionFactory = null) |
|
60 | |||
61 | /** |
||
62 | * Create Session stores it on the specified request attribute |
||
63 | * |
||
64 | * @param Request $request PSR7 Request |
||
65 | * @param Response $response PSR7 Response |
||
66 | * @param callable $next Next callable middleware |
||
67 | * |
||
68 | * @return Response |
||
69 | * |
||
70 | * @access public |
||
71 | */ |
||
72 | 1 | public function __invoke(Request $request, Response $response, callable $next) |
|
80 | } |
||
81 |