File tree 2 files changed +8
-6
lines changed
src/Symfony/Component/HttpFoundation 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -80,9 +80,12 @@ public function getLifetime()
80
80
return $ this ->meta ['lifetime ' ];
81
81
}
82
82
83
- public function stampNew ()
83
+ /**
84
+ * Stamps a new session's meta.
85
+ */
86
+ public function stampNew ($ lifetime = null )
84
87
{
85
- $ this ->stampCreated ();
88
+ $ this ->stampCreated ($ lifetime );
86
89
}
87
90
88
91
/**
@@ -134,10 +137,10 @@ public function setName($name)
134
137
$ this ->name = $ name ;
135
138
}
136
139
137
- private function stampCreated ()
140
+ private function stampCreated ($ lifetime = null )
138
141
{
139
- $ timeStamp = time ();//(null === $timeStamp) ? time() : $timeStamp;
142
+ $ timeStamp = time ();
140
143
$ this ->meta ['created ' ] = $ this ->meta ['lastused ' ] = $ this ->lastUsed = $ timeStamp ;
141
- $ this ->meta ['lifetime ' ] = ini_get ('session.cookie_lifetime ' );
144
+ $ this ->meta ['lifetime ' ] = ( null === $ lifetime ) ? ini_get ('session.cookie_lifetime ' ) : $ lifetime ;
142
145
}
143
146
}
Original file line number Diff line number Diff line change @@ -96,5 +96,4 @@ public function testClear()
96
96
{
97
97
$ this ->bag ->clear ();
98
98
}
99
-
100
99
}
You can’t perform that action at this time.
0 commit comments