Debian Codegraph @

lib/3rdParty/composer/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php

raw symbols SCIP
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <[email protected]>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\HttpFoundation\Session\Storage;
13
14 use Symfony\Component\HttpFoundation\Request;
15
16 // Help opcache.preload discover always-needed symbols
17 class_exists(MockFileSessionStorage::class);
18
19 /**
20 * @author Jérémy Derussé <[email protected]om>
21 */
22 class MockFileSessionStorageFactory implements SessionStorageFactoryInterface
23 {
24 /**
25 * @see MockFileSessionStorage constructor.
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 }