11
11
12
12
namespace Symfony \Component \HttpFoundation \Session ;
13
13
14
- use Symfony \Component \HttpFoundation \Session \Storage \StorageInterface ;
14
+ use Symfony \Component \HttpFoundation \Session \Storage \SessionStorageInterface ;
15
15
use Symfony \Component \HttpFoundation \Session \Attribute \AttributeBag ;
16
16
use Symfony \Component \HttpFoundation \Session \Attribute \AttributeBagInterface ;
17
17
use Symfony \Component \HttpFoundation \Session \Flash \FlashBag ;
@@ -31,18 +31,18 @@ class Session implements SessionInterface
31
31
/**
32
32
* Storage driver.
33
33
*
34
- * @var StorageInterface
34
+ * @var SessionStorageInterface
35
35
*/
36
36
protected $ storage ;
37
37
38
38
/**
39
39
* Constructor.
40
40
*
41
- * @param StorageInterface $storage A StorageInterface instance.
41
+ * @param SessionStorageInterface $storage A SessionStorageInterface instance.
42
42
* @param AttributeBagInterface $attributes An AttributeBagInterface instance, (defaults null for default AttributeBag)
43
43
* @param FlashBagInterface $flashes A FlashBagInterface instance (defaults null for default FlashBag)
44
44
*/
45
- public function __construct (StorageInterface $ storage , AttributeBagInterface $ attributes = null , FlashBagInterface $ flashes = null )
45
+ public function __construct (SessionStorageInterface $ storage , AttributeBagInterface $ attributes = null , FlashBagInterface $ flashes = null )
46
46
{
47
47
$ this ->storage = $ storage ;
48
48
$ this ->registerBag ($ attributes ?: new AttributeBag ());
@@ -204,7 +204,7 @@ public function getId()
204
204
/**
205
205
* Implements the \Serialize interface.
206
206
*
207
- * @return StorageInterface
207
+ * @return SessionStorageInterface
208
208
*/
209
209
public function serialize ()
210
210
{
@@ -214,13 +214,13 @@ public function serialize()
214
214
/**
215
215
* Implements the \Serialize interface.
216
216
*
217
- * @throws \InvalidArgumentException If the passed string does not unserialize to an instance of StorageInterface
217
+ * @throws \InvalidArgumentException If the passed string does not unserialize to an instance of SessionStorageInterface
218
218
*/
219
219
public function unserialize ($ serialized )
220
220
{
221
221
$ storage = unserialize ($ serialized );
222
- if (!$ storage instanceof StorageInterface ) {
223
- throw new \InvalidArgumentException ('Serialized data did not return a valid instance of StorageInterface ' );
222
+ if (!$ storage instanceof SessionStorageInterface ) {
223
+ throw new \InvalidArgumentException ('Serialized data did not return a valid instance of SessionStorageInterface ' );
224
224
}
225
225
226
226
$ this ->storage = $ storage ;
0 commit comments