| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
namespace Symfony\Component\HttpFoundation\Session\Storage; |
| 13 |
|
| 14 |
use Symfony\Component\HttpFoundation\Request; |
| 15 |
|
| 16 |
|
| 17 |
class_exists(MockFileSessionStorage::class); |
| 18 |
|
| 19 |
|
| 20 |
om> |
| 21 |
|
| 22 |
class MockFileSessionStorageFactory implements SessionStorageFactoryInterface |
| 23 |
{ |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
public function __construct( |
| 28 |
private ?string $savePath = null, |
| 29 |
private string $name = 'MOCKSESSID', |
| 30 |
private ?MetadataBag $metaBag = null, |
| 31 |
) { |
| 32 |
} |
| 33 |
|
| 34 |
public function createStorage(?Request $request): SessionStorageInterface |
| 35 |
{ |
| 36 |
return new MockFileSessionStorage($this->savePath, $this->name, $this->metaBag); |
| 37 |
} |
| 38 |
} |