@@ -25,10 +25,6 @@ class MigratingSessionHandler implements \SessionHandlerInterface
25
25
private $ currentHandler ;
26
26
private $ writeOnlyHandler ;
27
27
28
- /**
29
- * @param \SessionHandlerInterface $currentHandler
30
- * @param \SessionHandlerInterface $writeOnlyHandler
31
- */
32
28
public function __construct (\SessionHandlerInterface $ currentHandler , \SessionHandlerInterface $ writeOnlyHandler )
33
29
{
34
30
$ this ->currentHandler = $ currentHandler ;
@@ -49,10 +45,10 @@ public function close()
49
45
/**
50
46
* {@inheritdoc}
51
47
*/
52
- public function destroy ($ session_id )
48
+ public function destroy ($ sessionId )
53
49
{
54
- $ result = $ this ->currentHandler ->destroy ($ session_id );
55
- $ this ->writeOnlyHandler ->destroy ($ session_id );
50
+ $ result = $ this ->currentHandler ->destroy ($ sessionId );
51
+ $ this ->writeOnlyHandler ->destroy ($ sessionId );
56
52
57
53
return $ result ;
58
54
}
@@ -71,32 +67,30 @@ public function gc($maxlifetime)
71
67
/**
72
68
* {@inheritdoc}
73
69
*/
74
- public function open ($ save_path , $ session_id )
70
+ public function open ($ savePath , $ sessionId )
75
71
{
76
- $ result = $ this ->currentHandler ->open ($ save_path , $ session_id );
77
- $ this ->writeOnlyHandler ->open ($ save_path , $ session_id );
72
+ $ result = $ this ->currentHandler ->open ($ savePath , $ sessionId );
73
+ $ this ->writeOnlyHandler ->open ($ savePath , $ sessionId );
78
74
79
75
return $ result ;
80
76
}
81
77
82
78
/**
83
79
* {@inheritdoc}
84
80
*/
85
- public function read ($ session_id )
81
+ public function read ($ sessionId )
86
82
{
87
83
// No reading from new handler until switch-over
88
- $ result = $ this ->currentHandler ->read ($ session_id );
89
-
90
- return $ result ;
84
+ return $ this ->currentHandler ->read ($ sessionId );
91
85
}
92
86
93
87
/**
94
88
* {@inheritdoc}
95
89
*/
96
- public function write ($ session_id , $ session_data )
90
+ public function write ($ sessionId , $ sessionData )
97
91
{
98
- $ result = $ this ->currentHandler ->write ($ session_id , $ session_data );
99
- $ this ->writeOnlyHandler ->write ($ session_id , $ session_data );
92
+ $ result = $ this ->currentHandler ->write ($ sessionId , $ sessionData );
93
+ $ this ->writeOnlyHandler ->write ($ sessionId , $ sessionData );
100
94
101
95
return $ result ;
102
96
}
0 commit comments