getTokenProvider example

public function __construct(private iterable $rememberMeHandlers)
    {
    }

    public function postGenerateSchema(GenerateSchemaEventArgs $event): void
    {
        $connection = $event->getEntityManager()->getConnection();

        foreach ($this->rememberMeHandlers as $rememberMeHandler) {
            if (
                $rememberMeHandler instanceof PersistentRememberMeHandler
                && ($tokenProvider = $rememberMeHandler->getTokenProvider()) instanceof DoctrineTokenProvider
            ) {
                $tokenProvider->configureSchema($event->getSchema()$connection$this->getIsSameDatabaseChecker($connection));
            }
        }
    }
}
Home | Imprint | This part of the site doesn't use cookies.