vendor/symfony/http-kernel/EventListener/SessionListener.php line 48

  1. use Symfony\Component\HttpFoundation\Session\SessionInterface;
  2. /**
  3.  * Sets the session in the request.
  4.  *
  5.  * @author Fabien Potencier <fabien@symfony.com>
  6.  *
  7.  * @final
  8.  */
  9. class SessionListener extends AbstractSessionListener
  10. {
  11.     protected function getSession(): ?SessionInterface
  12.     {
  13.         if ($this->container->has('session_factory')) {
  14.             return $this->container->get('session_factory')->createSession();
  15.         }
  16.         return null;
  17.     }
  18. }