Skip to content

Commit 9e7c887

Browse files
Mile23paul-m
authored andcommitted
Issue #2987322 by Mile23: stream_wrapper_example cleanup
1 parent 8134585 commit 9e7c887

File tree

8 files changed

+126
-99
lines changed

8 files changed

+126
-99
lines changed

stream_wrapper_example/src/StreamWrapper/SessionWrapper.php renamed to stream_wrapper_example/src/SessionHelper.php

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
22

3-
namespace Drupal\stream_wrapper_example\StreamWrapper;
3+
namespace Drupal\stream_wrapper_example;
44

55
use Symfony\Component\HttpFoundation\RequestStack;
66

77
/**
8-
* Wrapper for modifying and accessing data embedded in the session object.
8+
* Helper to manage file wrapper data stored in the session object.
99
*/
10-
class SessionWrapper {
10+
class SessionHelper {
1111

1212
/**
1313
* Keep the top-level "file system" area in one place.
@@ -50,7 +50,7 @@ protected function getSession() {
5050
}
5151

5252
/**
53-
* Get whatever's in the store.
53+
* Get the contents of the session filesystem.
5454
*
5555
* @return array
5656
* An associated array where scalar data represents a file, and arrays
@@ -63,14 +63,10 @@ protected function getStore() {
6363
}
6464

6565
/**
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.
7067
*
7168
* @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.
7470
*/
7571
protected function setStore(array $store) {
7672
$session = $this->getSession();
@@ -229,13 +225,6 @@ public function checkPath($path) {
229225
return isset($store_info['tip'][$path_info['basename']]);
230226
}
231227

232-
/**
233-
* Set up the store for use.
234-
*/
235-
public function setUpStore() {
236-
// Nothing to do with $_SESSION version.
237-
}
238-
239228
/**
240229
* Zero out the store.
241230
*/

0 commit comments

Comments
 (0)