1
1
<?php
2
2
3
- namespace Drupal \stream_wrapper_example \ StreamWrapper ;
3
+ namespace Drupal \stream_wrapper_example ;
4
4
5
5
use Symfony \Component \HttpFoundation \RequestStack ;
6
6
7
7
/**
8
- * Wrapper for modifying and accessing data embedded in the session object.
8
+ * Helper to manage file wrapper data stored in the session object.
9
9
*/
10
- class SessionWrapper {
10
+ class SessionHelper {
11
11
12
12
/**
13
13
* Keep the top-level "file system" area in one place.
@@ -50,7 +50,7 @@ protected function getSession() {
50
50
}
51
51
52
52
/**
53
- * Get whatever's in the store .
53
+ * Get the contents of the session filesystem .
54
54
*
55
55
* @return array
56
56
* An associated array where scalar data represents a file, and arrays
@@ -63,14 +63,10 @@ protected function getStore() {
63
63
}
64
64
65
65
/**
66
- * Set the complete content of our session.
67
- *
68
- * We do this since we cannot directly probe the PHP @_SESSION variable
69
- * via a PHP reference. We can only get or set automically.
66
+ * Set the contents of our session filesystem.
70
67
*
71
68
* @param array $store
72
- * The content of the whole session data store, to replace all of the
73
- * current data.
69
+ * The whole filesystem represented as an array.
74
70
*/
75
71
protected function setStore (array $ store ) {
76
72
$ session = $ this ->getSession ();
@@ -229,13 +225,6 @@ public function checkPath($path) {
229
225
return isset ($ store_info ['tip ' ][$ path_info ['basename ' ]]);
230
226
}
231
227
232
- /**
233
- * Set up the store for use.
234
- */
235
- public function setUpStore () {
236
- // Nothing to do with $_SESSION version.
237
- }
238
-
239
228
/**
240
229
* Zero out the store.
241
230
*/
0 commit comments