Deprecated: Constant E_STRICT is deprecated in /home/pastorz/old-espace-client/vendor/symfony/error-handler/ErrorHandler.php on line 58

Deprecated: Constant E_STRICT is deprecated in /home/pastorz/old-espace-client/vendor/symfony/error-handler/ErrorHandler.php on line 76
Symfony Profiler

vendor/symfony/http-foundation/Session/SessionFactory.php line 18

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony package.
  4.  *
  5.  * (c) Fabien Potencier <fabien@symfony.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace Symfony\Component\HttpFoundation\Session;
  11. use Symfony\Component\HttpFoundation\RequestStack;
  12. use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageFactoryInterface;
  13. // Help opcache.preload discover always-needed symbols
  14. class_exists(Session::class);
  15. /**
  16.  * @author Jérémy Derussé <jeremy@derusse.com>
  17.  */
  18. class SessionFactory implements SessionFactoryInterface
  19. {
  20.     private $requestStack;
  21.     private $storageFactory;
  22.     private $usageReporter;
  23.     public function __construct(RequestStack $requestStackSessionStorageFactoryInterface $storageFactory, callable $usageReporter null)
  24.     {
  25.         $this->requestStack $requestStack;
  26.         $this->storageFactory $storageFactory;
  27.         $this->usageReporter $usageReporter;
  28.     }
  29.     public function createSession(): SessionInterface
  30.     {
  31.         return new Session($this->storageFactory->createStorage($this->requestStack->getMainRequest()), nullnull$this->usageReporter);
  32.     }
  33. }