adt / doctrine-session-handler
Doctrine会话处理器
v2.3.1
2022-11-23 14:51 UTC
Requires
- php: >=8.0
README
composer require adt/doctrine-session-handler
<?php namespace App\Entity; use ADT\DoctrineSessionHandler\SessionInterface; use ADT\DoctrineSessionHandler\SessionTrait; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity */ #[ORM\Entity] class SessionStorage extends BaseEntity implements SessionInterface { use SessionTrait; /** * @var integer * * @ORM\Id * @ORM\Column(type="integer", nullable=false) * @ORM\GeneratedValue */ #[ORM\Id] #[ORM\Column(nullable: false)] #[ORM\GeneratedValue] public int $id; }
services: sessionHandler: ADT\DoctrineSessionHandler\Handler(\App\Entity\SessionStorage) session: autoStart: smart handler: @sessionHandler